Dear Oliver,
The '|' operator is not a function in the Oz sense. As Torsten pointed out,
this operator is a shortcut to building tuples: A|B is translated by the
compiler into '|'(A B).
Using Fold or Map with a function like "fun{$ A B} A|B end" is what we
usually do ourselves. And there's nothing wrong with it ;-)
Cheers,
Raphael
On Sun, Feb 7, 2010 at 6:45 PM, Oliver Mooney <[email protected]>wrote:
> Hi all,
>
> How do I refer to the cons function or | operator to use it in a fold or
> map? I can always wrap it in a function like:
>
> fun {MyCons A B} A|B end
>
> but I don't see how to refer to the | directly (like I can to + using
> Number.'+' for example).
>
> Thanks,
> Oliver.
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users