Quirino Zagarese wrote:

>Of course I'm seeing it's a very powerful feature.
>I was just trying to understand why the expression _|1 does not match
>4|3|2|1 even if _ matches 4|3|2.
>Anyway thank you for helping me!
>Regards

That is because 4|3|2|1 is the record '|'(4 '|'( ...) ) while _|1 is the record 
'|'(_ 1) 

Less technically, it is because of the way lists are constructed using the '|' 
(cons) operator.
     1) Right associatively, and
     2) with nil as the initial element.

Chapter 2 of CTM has a good explanation of this stuff.

d

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to