2 ms·
> Unlike a pure stack language, you can operate on values at any point in the stack, not just the top. There's a language, Joy, that has combinators that allow
by carapace 7y ago
> Unlike a pure stack language, you can operate on values at any point in the stack, not just the top.
There's a language, Joy, that has combinators that allow you to work deeper in the stack, e.g. "dip":
a b c [F] dip
-------------------
a b F c
dipd == [dip] cons dip
a b c [F] dipd
a b c [F] [dip] cons dip
a b c [[F] dip] dip
a b [F] dip c
a F b c
And so on...
I think it's a "Category Theory" paradigm language, whatever that might mean.
Joy resembles the point-free form of Haskell from Conal Elliott's "Compiling to categories" http://conal.net/papers/compiling-to-categories/ http://conal.net/papers/compiling-to-categories/ )