News for hackers. Stuff that matters.
Re:The Spiral Language by rurban on Friday July 13, 2018 @02:10AM (#17520848)

    inl add a b = a + b
    inl f = add 1
    f 2, f 3
is just awesome
Re:The Spiral Language by skrebbel on Friday July 13, 2018 @02:25AM (#17520893)
That's just normal partial function application, right? Or am I missing something special?
Re:The Spiral Language by rurban on Friday July 13, 2018 @03:02AM (#17521017)
Yes, but I adore the simple syntax.

    inl add a b = a + b
is basically a macro #define add(a,b) a+b

    inl f = add 1
is a macro #define f add(1)

    f 2, f 3
but e.g.

    inl f = add c
would create a closure to capture c. inl would guarantee that the capturing is lexical, not dynamic.

There's no need for the comma operator in args, comma is to create lists.

Re:The Spiral Language by rurban on Friday July 13, 2018 @09:06AM (#17522582)
oops: inl f(x) = add(1,x) of course
Re:The Spiral Language by TurboHaskal on Friday July 13, 2018 @02:48AM (#17520976)
It blew my mind when I saw it on K. I just wasn't expecting it.

    add:{x+y}
    f:add 1
    f 2
  3
Re:The Spiral Language by catwell on Friday July 13, 2018 @04:37AM (#17521384)
Similarly, Haskell would be:

    add = (+)
    f = add 1
    f 2
This kind of syntax is great for small code samples or to play in a CLI, but in larger programs more traditional (verbose) syntax works better for me. YMMV.
Re:The Spiral Language by moomin on Friday July 13, 2018 @06:29AM (#17521781)
The syntax, though, is part of a more important point: all functions have one input and one output. This _massively_ simplifies other things.

Also, and this isn’t really an FP point, if you’ve got a lot of positional parameters you’re already Doing It Wrong.