Just nitpicking, but for me those thread-first/last operators beg for "proper"
formatting with newlines and indentation to emphasize the "threading", like
not:
(-> 2 (* 5) (+ 3))
but:
(-> 2
(* 5)
(+ 3))
also as mentioned before, using thread-first and thread-last to name those
macro-operators would help to remember what they do.
-FS.
On Jun 11, 2012, at 11:22 AM, Jacek Laskowski wrote:
> On Sat, Jun 9, 2012 at 11:41 AM, Lucas Marinho <[email protected]> wrote:
>
>> ((comp #(+ % 1) #(+ % 2)) 0)
>
> I couldn't resist.
>
> #(+ % 1) == inc
>
> #(+ % 2) == (partial + 2)
>
> They give much better-looking functional program. Hope you forgive me :-)
>
> Jacek
>
> --
> Jacek Laskowski
> Functional languages (Clojure), Java EE, and IBM WebSphere -
> http://blog.japila.pl
> "Never discourage anyone who continually makes progress, no matter how
> slow." Plato
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en