~kdsch/kappa

A concatenative programming language
5ac3e8e7 — Karl Schultheisz 1 year, 9 months ago
Merge pull request #8 from kdsch/nayuki
f05a998a — Karl Schultheisz 1 year, 9 months ago
README.md: add fast fibonacci algorithm example
1c48833c — Karl Schultheisz 1 year, 9 months ago
Merge pull request #7 from kdsch/6-move-benchmarks

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~kdsch/kappa
read/write
git@git.sr.ht:~kdsch/kappa

You can also use your local clone with git send-email.

#The Kappa Programming Language

Kappa is a functional concatenative programming language based on Robert Kleffner's lambda compose (2017).

#Example

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

#Hopes

  • [x] Modular implementation
  • [ ] Full type inference