[Haskell-beginners] Is all Haskell syntax pointfree compatible?
Christopher Howard
christopher.howard at frigidcode.com
Sat Nov 24 11:13:43 CET 2012
After reading the Haskell wiki article about pointfree style I naturally
started playing around with with converting my regular code to
pointfree. However, I immediately got stuck on the specific cases of 1)
do syntax and 2) record syntax. For example:
code:
--------
playMusic rt =
do [source] <- genObjectNames 1
buffer source $= getSound rt "music.wav"
sourceGain source $= 0.4
loopingMode source $= Looping
play [source]
--------
And another (contrived) example:
code:
--------
data A = A { u :: Int
, v :: Double
, w :: String
, ...
}
f a b = a { v = b }
--------
--
frigidcode.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121124/d2e79fe3/attachment.pgp>
More information about the Beginners
mailing list