pajatopmr
03/28/2021, 12:51 PMz
and f
.pajatopmr
03/28/2021, 8:36 PMfoldRight()
in terms of foldLeft()
Can someone suggest a better name for f
. I think acc
still works fine for z
.marc0der
04/05/2021, 8:43 AMz
as zero value, acc
as accumulator and f
as function. In other places you will see things like xs
, which represents a linked list. You will see this kind of naming convention again and again in most of the fp books around. Hope that helps a bit!pajatopmr
04/05/2021, 11:18 AMmarc0der
04/05/2021, 12:50 PMAnd while I'm ranting, put some damn tests in your books! Why is it that authors of programming books so often treat testing as an afterthought, if at all? (Rhetorical question of course)If you knew me, you really wouldn't say that I think tests are an afterthought. The tests really don't belong in the book, as it would distract from the content, and besides, simply isn't the way Manning do it. Feel free to clone the GitHub repo where all the tests can be found. As far as the naming convention goes, I'm not going to get involved in lengthy arguments but it really is the convention in FP circles. Cheers.
pajatopmr
04/06/2021, 7:10 AM