All Projects → OscarSaharoy → lambda-fibonacci

OscarSaharoy / lambda-fibonacci

Licence: other
Implementation of the Fibonacci sequence in JS using pure Lambda Calculus

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lambda-fibonacci

lambda-zero
A minimalist pure lazy functional programming language
Stars: ✭ 65 (+261.11%)
Mutual labels:  lambda-calculus
human-memory
Course materials for Dartmouth course: Human Memory (PSYC 51.09)
Stars: ✭ 239 (+1227.78%)
Mutual labels:  theory
vanilla-lang
An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types
Stars: ✭ 73 (+305.56%)
Mutual labels:  lambda-calculus
gidti
Book: Gentle Introduction to Dependent Types with Idris
Stars: ✭ 70 (+288.89%)
Mutual labels:  lambda-calculus
lambda-notebook
Lambda Notebook: Formal Semantics in Jupyter
Stars: ✭ 16 (-11.11%)
Mutual labels:  lambda-calculus
meta-cedille
Minimalistic dependent type theory with syntactic metaprogramming
Stars: ✭ 40 (+122.22%)
Mutual labels:  lambda-calculus
BOHM1.1
Bologna Optimal Higher-Order Machine, Version 1.1
Stars: ✭ 45 (+150%)
Mutual labels:  lambda-calculus
salt
The compilation target that functional programmers always wanted.
Stars: ✭ 62 (+244.44%)
Mutual labels:  lambda-calculus
pomagma
An inference engine for extensional untyped λ-calculus
Stars: ✭ 15 (-16.67%)
Mutual labels:  lambda-calculus
lambda-calculus
An introduction to the Lambda Calculus
Stars: ✭ 59 (+227.78%)
Mutual labels:  lambda-calculus
abella
An interactive theorem prover based on lambda-tree syntax
Stars: ✭ 81 (+350%)
Mutual labels:  lambda-calculus
DecisionTrees
Seminar work "Decision Trees - An Introduction" with presentation, seminar paper, and Python implementation
Stars: ✭ 111 (+516.67%)
Mutual labels:  theory
system-F
Formalization of the polymorphic lambda calculus and its parametricity theorem
Stars: ✭ 20 (+11.11%)
Mutual labels:  lambda-calculus
nftsim
C++ library for simulation of multiscale neural field dynamics
Stars: ✭ 24 (+33.33%)
Mutual labels:  theory
LambdaCalculusPlayground
An Android app that provides a visual interface for creating and evaluating lambda calculus expressions
Stars: ✭ 16 (-11.11%)
Mutual labels:  lambda-calculus
js-church-encoding
Church Encoding Implementation in JavaScript
Stars: ✭ 33 (+83.33%)
Mutual labels:  lambda-calculus
universe-of-syntax
A universe of scope- and type-safe syntaxes (syntices?). Includes generic implementation of type-preserving renaming/substitution with all the proofs you could possibly need.
Stars: ✭ 16 (-11.11%)
Mutual labels:  lambda-calculus
Krivine-Machine
Abstract krivine machine implementing call-by-name semantics. In OCaml.
Stars: ✭ 34 (+88.89%)
Mutual labels:  lambda-calculus
lambda
lambda calculus interpreter
Stars: ✭ 23 (+27.78%)
Mutual labels:  lambda-calculus
lambda
Macro Lambda Calculus
Stars: ✭ 38 (+111.11%)
Mutual labels:  lambda-calculus

lambda-fibonacci

Implementation of the Fibonacci sequence in JS using pure lambda calculus (except for printing the list at the end), using Church encoding for data.

The only rules available in lambda calculus are:

  • A character or string can represent a variable: X = ...
  • A function can be defined with parameters and a body, with the arguments becoming bound: Y = a => ...
  • A function can be applied to an argument: Y(X)

That means no operators, no numbers, no loops, no self-referential functions, and no state.

These rules are actually enough to calculate anything that a Turing Machine can, so it's turing complete. In this JS file I've written a few functions and put them together to calculate the first few terms of the fibonacci sequence.

You can run the code here (the code output is in the console): https://jsfiddle.net/OscarSaharoy/us64m7rn/

The functions used:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].