Oft-forgotten feature about the curly-fn package: if you don’t include any 
arguments, it works as a shorthand for curry. So really, the idiomatic curly-fn 
solution would just be #{map sqr}, the shortest of the four. (Disclaimer: I 
wrote the curly-fn package.)

Tongue-in-cheek comments aside, the point-free package really is great, and any 
one of the crazy function shorthands should work just fine. You can also avoid 
needing special function syntax entirely by just using `curry` from 
racket/function directly, like (curry map sqr). And obviously you could also 
always just use the full lambda syntax, but brevity is nice.

This is an area in which there are probably too many options, but opinions are 
strong, and we have not standardized (yet). Feedback is welcome!

> On Dec 12, 2015, at 4:33 PM, Jack Firth <jackhfi...@gmail.com> wrote:
> 
> There's also the fancy-app, curly-fn, and afl packages for different ways of 
> writing anonymous functions (cut and cute from srfi/26 always seemed awkward 
> to me).
> 
> cut:
> (cut map sqr <>)
> 
> fancy-app:
> (map sqr _)
> 
> curly-fn
> #{map sqr %}
> 
> afl:
> #λ(map sqr %)
> 
> point-free doesn't give you special syntax for writing functions, ~> is just 
> a regular procedure. So it works with all of them. (Disclaimer: I wrote the 
> point-free package)
> 
> -- 
> 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.

-- 
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