etng-r2/how-to-save-on-brackets.txt
author Tony Garnock-Jones <tonygarnockjones@gmail.com>
Wed, 16 Jan 2019 17:15:58 +0000
changeset 438 1fe179d53161
parent 263 3cba309393c7
permissions -rw-r--r--
Add missing primitive implementation for the plain interpreter.
So currently {} is non-self-capturing and [] is self-capturing. What
if instead, the keyword "rec" (either "record" (== object) or
"recursive") were used to introduce a self-binding/open-recursion?

{ x -> x + 1 }	       	  	    { x -> x + 1 }

rec { x -> x + 1 }		    [ x -> x + 1 ]

It provides a nice place to put a name for self, too, if we decide
that's a good idea:

rec self { x -> x + 1 }