
24 Nov
2012
24 Nov
'12
5:13 a.m.
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