etng-r2/how-to-save-on-brackets.txt
author Tony Garnock-Jones <tonygarnockjones@gmail.com>
Tue, 25 May 2010 08:09:57 +1200
changeset 285 034958cf32d9
parent 263 3cba309393c7
permissions -rw-r--r--
Notes and incomplete work. -rw-r--r-- 1 tonyg staff 3935 Aug 11 2009 boot.tng-modules -rw-r--r-- 1 tonyg staff 454 Aug 9 2009 calc.tng -rw-r--r-- 1 tonyg staff 1214 Apr 16 18:18 clojure-sequences-20100416.txt -rw-r--r-- 1 tonyg staff 2265 Feb 24 13:20 monadic-book.tng -rw-r--r-- 1 tonyg staff 290 Dec 29 19:37 things-to-consider.txt
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
263
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     1
So currently {} is non-self-capturing and [] is self-capturing. What
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     2
if instead, the keyword "rec" (either "record" (== object) or
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     3
"recursive") were used to introduce a self-binding/open-recursion?
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     4
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     5
{ x -> x + 1 }	       	  	    { x -> x + 1 }
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     6
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     7
rec { x -> x + 1 }		    [ x -> x + 1 ]
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     8
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     9
It provides a nice place to put a name for self, too, if we decide
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    10
that's a good idea:
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    11
3cba309393c7 Half-way through experimentation with oo:fp:parsing language in etng-r2
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    12
rec self { x -> x + 1 }