News for hackers. Stuff that matters.
Re:FizzBuzz in ten languages by Tarean on Monday December 31, 2018 @07:32PM (#18798104)
You can name things like

    (\id. ...) (\x. x)
This names the identity function id. You can make this slightly prettier like

    (\let. ...) (\def body. body def)
Which lets you do

    let (\x. x) \id. ...

Booleans are also functions

    let (\t f. t) \true.
    let (\t f. f) \false.
    let (\x. x) \then.
    let (\x. x) \else.
    let (\b thenLit ift elseLit iff. b ift iff) \if.
Which lets you write

     if true then foo else bar
Where then and else are thrown away, without them it is basically lisp syntax. You could make this slightly fancier - translate into cps to support `else if` and require `end` at the end.

Tl;dr: with hacks

There are no comments on this comment yet.