On Sat, Sep 13, 2008 at 9:48 AM, mark <[EMAIL PROTECTED]> wrote:

> Hi,
> Thanks for that, it's exactly what I needed.
>
> Just one question though.
> In the function used for the outer mapping,
>       fun {$ A} B in A = B#_ B end}
> (and the sort function for that matter!)
>
> It was my understanding that A would be bound to each value in the list
> being mapped as each is processed.
> How then can A=B#_ within the function , surely this is binding A to
> another value?
>

No, this is not *binding* A to another value, it is *unifying* A to another
value.  In this case, A is unmodified, but B is bound to the first field of
A, and _ is bound to its second field.

YMMV, but I personally find the above function an obscure way of writing

   fun {$ A} A.1 end


> Obviously it works and I can understand the algorithm, but from what I've
> been taught, A can't be bound to a value twice and therefore there must be a
> fault somewhere in my understanding of binding/syntax.
> If someone could offer a short explanation I would be grateful.
>
> Regards
>
> Mark
>
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to