[Haskell-cafe] Point-free style in guards

L29Ah zl29ah at gmail.com
Tue Jul 22 13:18:41 EDT 2008


outStanza | (isMessage) = outMessage
            | (isPresence) = outPresence
            | (isIQ) = outIQ

Why such a style doesn't work, so I must write ugly code like that:

outStanza a | (isMessage a) = outMessage a
            | (isPresence a) = outPresence a
            | (isIQ a) = outIQ a

so, guards can't be useful in point-free function definitions in any way
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080722/9ec2f017/attachment.htm


More information about the Haskell-Cafe mailing list