Sat, 20 Oct 2001 10:58:02 +0800 (GMT-8), Saswat Anand <[EMAIL PROTECTED]> pisze:
> I am wondering why this function should not work with input [x,y]
> (list with two elements) too, since third element is not referenced.
What a pattern matches is independent from which of the variables
it binds
Hi,
I am wondering why this function should not work with input [x,y]
(list with two elements) too, since third element is not referenced. Why
is it so eager to pattern match.
fun = \list -> let [a,b,c] = list
in [a,b]
Thanks,
Saswat