argument ordering
Sebastian Sylvan
sebastian.sylvan at gmail.com
Mon Aug 22 10:07:54 EDT 2005
On 8/22/05, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
> Christian Maeder wrote:
> > Okasaki, C. DR EECS wrote:
> >
> >> insert 1 a $ insert 2 b $ insert 3 c dict
> >
> >
> > A further argument for this notation is its close resemblance to the
> > notation with function composition:
> >
> > insert 1 a . insert 2 b . insert 3 c $ dict
>
> ... of course keeping in mind that that's exactly the "wrong" way
> to compose functions. See any algebra textbook for
> definition of (f . g) (namely, first apply f, then apply g)
Aaaah.. No... That's not the way I learnt it at least, and it's not
how it's defined in Haskell.
f . g x = f (g x )
First appy g, then apply f to the result...
See e.g. http://mathworld.wolfram.com/Composition.html
/S
--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862
More information about the Libraries
mailing list