[Haskell-beginners] Help with "20 intermediate haskell exercises"
Daniel Fischer
daniel.is.fischer at web.de
Sun Jul 5 15:44:56 EDT 2009
Am Sonntag 05 Juli 2009 21:05:20 schrieb Patrick LeBoutillier:
> Hi,
>
> Thanks for the help. I figured it out after that. I'm having a hard
> time with the other exercises though, I'm currently stuck at 14:
>
>
> class Misty m where
> banana :: (a -> m b) -> m a -> m b
> unicorn :: a -> m a
>
> -- Exercise 14
> -- Relative Difficulty: 6
> moppy :: (Misty m) => [a] -> (a -> m b) -> m [b]
> moppy = error "todo"
moppy [] mop = ?
moppy (a:as) mop = (mop a) ?? (moppy as mop)
use (among other things) banana and unicorn to replace the question marks
>
>
> Does anyone know if the solutions are posted anywhere?
They're (under different names) in the standard libraries :)
>
>
> Patrick
More information about the Beginners
mailing list