websitehot

Combinators in Array Languages

blog.softwarewrighter.com

About Combinators in Array Languages

Prior to this post, searching this site for “Y combinator” turned up nothing. The search engine was innocent: no post had ever covered it, despite the fact that the repos have carried working fixed-point combinators since August. This short post closes the gap. Resource Link Run the birds live mlpl.softwarewrighter.com — Load Demo… > Array / APL > Combinators (the birds) The book To Mock a Mockingbird — Raymond Smullyan’s aviary of combinator birds, in puzzle form Sage, CLI-side sw-ml-study/demo-combinators — lessons 17 (fixed_points), src/fixed_points.mlpl, and the derived-combinators doc The bird Raymond Smullyan’s To Mock a Mockingbird names the combinators…

In the maker’s words

Raymond Smullyan’s "To Mock a Mockingbird" book's aviary of combinator birds implemented in APL-derived languages and the problem implementing the Sage bird (Fixed Point or Y combinator) in an eagerly evaluated language. Newer APLs support lazy evaluation. My eager language has a workaround for this. The Z combinator is the standard strict-language fix: wrap the self-application in one extra function layer (λv. x x v), so the recursion is a value (a delayed call) rather than an executing expression. sw-MLPL expresses that delay as a named partial — z_step/z_recur/applicative_sage — because the language has no anonymous lambdas. Z has no Smullyan name (and no zebra in the aviary, despite the letter). The book predates and ignores the strictness problem, so it has no applicative-order variant. "Z combinator" is programmer folklore for the eta-expanded Y
softwarewright, launching on Hacker News

Where people found it

More sites like Combinators in Array Languages