<div dir="auto"><div dir="auto">Hi,</div>Looking at the structure of the expression, you should have<div dir="auto"><br></div><div dir="auto">foldr operator accumulator list</div><div dir="auto"><br></div><div dir="auto">So in your example the accumulator should be "return" (because it is the second argument)</div></div><br><div class="gmail_quote"><div dir="ltr">Il gio 26 lug 2018, 03:45 Olumide <<a href="mailto:50295@web.de">50295@web.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear List,<br>
<br>
Chapter 13 of LYAH <br>
(<a href="http://learnyouahaskell.com/for-a-few-monads-more#useful-monadic-functions" rel="noreferrer noreferrer" target="_blank">http://learnyouahaskell.com/for-a-few-monads-more#useful-monadic-functions</a>) <br>
has the following code block<br>
<br>
import Data.List<br>
<br>
inMany :: Int -> KnightPos -> [KnightPos]<br>
inMany x start = return start >>= foldr (<=<) return (replicate x oveKnight)<br>
<br>
What I'd like to know is where the accumulator of foldr is in this example.<br>
<br>
Regards,<br>
<br>
- Olumide<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank" rel="noreferrer">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>