Open
Description
While attempting to implement findM
, I ran into problems with this test:
>>> let p x = (\s -> (const $ pure (x == 'i')) =<< put (1+s)) =<< get in runState (findM p $ listh ['a'..'h']) 8
(Empty,8)
I couldn't do it (could only get (Empty, 16)
so I looked the answer here: https://github.com/tonymorris/course/blob/master/src/Course/State.hs
The answer as semantically the same as mine, though just as a sanity check I copied and pasted it, ran stack test
and it still gave me an error.
Metadata
Metadata
Assignees
Labels
No labels