Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell point-free

Name: Anonymous 2009-12-25 17:12

I have this:


ops :: [[Char] -> [Char]]
...
fun :: [Char] -> [[Char]]
fun str = zipWith ($) ops $ words str


How do I write fun in a point-free style? Dropping the argument gives me type errors.

Name: Anonymous 2010-01-09 14:39

OP back here, still learning Haskell, and Im stuck at the technical aspects of monads.

liftM :: (Monad m) => (a1 -> r) -> m a1 -> m r
Right?
So, why doesnt liftM elem (Just 'd') (Just "dongz") work? m is Maybe, a1 is Char and r is [Char]. What's wrong?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List