[racket-dev] P4P: A Syntax Proposal
On Wed, Jul 28, 2010 at 7:23 PM, Barland, Ian <ibarland at radford.edu> wrote:
> * Any p4p equivalents for the other racket constructs which use extra-parens
> (mostly: let and named-let)?
As you wish!
I'm currently not supporting named-let. Meanwhile, my in-flight work
for this morning:
let:
x = 3,
y = 2
in:
+(x, y)
let*: x = 3, y = x in: +(x, y)
letrec: even = ;; perversely written as a one-liner
fun: (n) in: if: zero?(n) true else: odd?(sub1(n)),
odd = fun: (n) in:
if: zero?(n)
false
else:
odd?(sub1(n))
in: list(odd?(10), even?(10))
Note the new indentation rule, described in the manifesto.
Shriram