<div dir="ltr">I have this <div><br></div><div>myLength1 = foldl (\n _ -> n + 1) 0<br></div><div><br></div><div>and this </div><div><br></div><div>myLength2 = foldr (\_ n -> n + 1) 0<br></div><div><br></div><div>I am guessing that foldl knows to assign the accumulator-seed argument to the dependent variable and the list argument's elements recursively to the independent variable; and with foldr to do the opposite. Is this a fair assumption? BTW, where can I get a look at the code for fold functions; or does the type definition answer my original question? Not really able to decipher it so well</div><div><br></div><div> :t foldl<br>foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b<br></div><div><br></div><div>LB</div></div>