Hi,
Looking at the structure of the expression, you should have

foldr operator accumulator list

So in your example the accumulator should be "return" (because it is the second argument)

Il gio 26 lug 2018, 03:45 Olumide <50295@web.de> ha scritto:
Dear List,

Chapter 13 of LYAH
(http://learnyouahaskell.com/for-a-few-monads-more#useful-monadic-functions)
has the following code block

import Data.List

inMany :: Int -> KnightPos -> [KnightPos]
inMany x start = return start >>= foldr (<=<) return (replicate x oveKnight)

What I'd like to know is where the accumulator of foldr is in this example.

Regards,

- Olumide




_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners