comp composes functions just like the dot operator
On Nov 24, 6:14 pm, dokondr <[EMAIL PROTECTED]> wrote:
> On Nov 25, 2:06 am, Jarkko Oranen <[EMAIL PROTECTED]> wrote:
> ...
>
> > > -- 3) Function composition:
> > > Prelude> (f2 . f) 3
> > > 8
> > > Prelude>
>
> > 1) (def fn1 (partial + 1))
> > 2) (def fn2 #(* % 2)) or (fn [x] (* x 2)))
> > 3) ((comp fn2 fn1) 3)
>
> > --
> > Jarkko
>
> And what is 'comp'?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---