On Thu, Oct 8, 2015 at 6:48 PM, Jay McCarthy <jay.mccar...@gmail.com> wrote:
>
>>> My opinion is to include something like this in remix along with some
>>> nice syntax for cut (what ignorant people call "function literals".)
>>
>> I admit I can’t really disagree with this point. I’m mostly just interested 
>> in what syntax you have in mind.
>
> The idea would be to make it like super cut, but with . to give it
> that delicious C-like crunchy topping
>
> https://github.com/jeapostrophe/exp/blob/master/scut.ss
>
> So,
>
> λ.(+ $ 1) => (λ (x) (+ x 1)
> λ.(+ $.0 $.1) => (λ (x y) (+ x y))
> λ.(+ $.x 1) => (λ (#:x x) (+ x 1)
> λ.(+ $.x $8) => (λ (#:x x a0 a1 a2 a3 a4 a5 a6 a7 a8) (+ x a8)
> λ.(apply + $.0 $.…) => (λ (x . args) (apply + x args))

Perhaps unsurprisingly, since this is what I implemented in fancy-app,
I think that once you're numbering things, the whole enterprise has
gone off the rails.

Either (+ _ _) [1] should mean (lambda (x) (+ x x)) or (lambda (x y)
(+ x y)) or a syntax error, but when you need to get fancier, named
function arguments are a great thing.

[1] Or whatever preferred syntax we settle on.

Sam

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to