Hi Timothy,

This is not really related to the current thread (sorry), but I want
to say thanks for this API examples page, it looks like it'll be a
great help, just what I need! Somehow I'd managed to completely miss
it until now when you mentioned it - either I'm partially blind, or it
could be better advertised?

Cheers,
Craig

On Tue, Dec 30, 2008 at 4:25 AM, Timothy Pratley
<timothyprat...@gmail.com> wrote:
>
> On Dec 30, 2:49 pm, wubbie <sunj...@gmail.com> wrote:
>> Very criptic for newbie.
>> What  does "Threads the expr through the forms." mean?
>
> Shameless plug, if you find learning from examples easier than textual
> descriptions, you might want to look up
> http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples
> I'm trying to fully cover the entire API with snippets and examples as
> I come across them... its pretty well fleshed out now, but still some
> gaps to fill
>
> In this case the entry is:
>
> ->
>
> user=> (-> "hello" .toUpperCase (.replace "H" "J"))
> "JELLO"
>
> However -> works on everything
> user=> (-> true (if inc dec) (map [1 2 3]))
> (2 3 4)
>
> or expanded
>  (map (if true inc dec) [1 2 3])
>
> So one can also use macros and normal functions in ->, ie. non-
> methods.
>
>
> In this case -> is pretty difficult to get your head around in either
> example or textual though, so YMMV :)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to