2007/12/28, Alfonso Acosta <[EMAIL PROTECTED]>:
> @ works as an aliasing primitive for the arguments of a function
>
> f x@(Just y) = ...
>
> using "x" in the body of f is equivalent to use "Just y". Perhaps in
> this case is not really useful, but in some other cases it saves the
> effort and space of retyping really long expressions. And what is even
> more important, in case an error is made when choosing the pattern,
> you only have to correct it in one place.
>

And in plenty of case it will greatly boost your speed because you
won't be reconstructing the objects against which you matched every
time you want to return them unchanged.

-- 
Jedaï
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to