Merge pull request #8 from kdsch/nayuki
README.md: add fast fibonacci algorithm example
Merge pull request #7 from kdsch/6-move-benchmarks
Kappa is a functional concatenative programming language based on Robert Kleffner's lambda compose (2017).
defn fib { _fib drop }
defn square { dup * }
defn _fib {
bind n (
n 1 <
{ 0 1 }
{
n 2 / _fib
bindv b a (
a square b square +
2 b * -1 a * + a *
)
bindv c d (
n 2 % 1 <
{ c d }
{ d c d + }
if @
)
} if @
)
}
Algorithm credit: Project Nayuki