
12 Nov
2016
12 Nov
'16
8:27 p.m.
On Sat, Nov 12, 2016 at 08:20:19PM +0000, Lawrence Wickert wrote:
Hello all,
I am a rank beginner to functional languages. Working through Lipovaca's book, up to Chapter 3.
[...]
*Main> length' 1:2:3:[]
Hello Lawrence, remember that function application has precedence over operators! So writing: *Main> length' 1:2:3:[] is equivalent to writing *Main> (length' 1) :2:3:[] (which is not what you want). If you add parentheses, your expression works again! *Main> length' (1:2:3:[])