Chris Rathman wrote:

local L X in
  L.2 = c|o|r|n
  L.1 = X
  a = X
  {Show L}
end

At the end, L should be a|c|o|r|n. My code above, however, causes the program to enter a wait state (which I think I understand that the unification on the tail requires that the head be known first). The question is whether there's a way to work around this?

As Jorge wrote, L.2 waits until L is constrained to be a record. The simplest way to unblock this is to tell first that L is a tuple with two elements:

local L X in
   L = _|_           % L is a nonempty list
   L.2 = c|o|r|n
   L.1 = X
   a = X
  {Show L}
end

Cheers,
raph

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

Reply via email to