Hello.

The functions in list module are determinstic. For example I want to use the List.append function as nondeterministic for parsing string, but it don't work:

Str in
List = {List.append "(" Str}

I found the nondet. realization of this function in Internet:

proc {Append L1 L2 L3}
  dis L1=nil L2=L3
  [] X M1 M3 in
     L1=X|M1 L3=X|M3 {Append M1 L2 M3}
  end
end

and it work fine. Why the functions in List is deteministik? E.g. the same function (append) of Curry language is nondetermenistik. And second question. In Curry there are operator of lists conctenation - "++". And able to write very comfortably list matching:
s =:= s1 ++ "+" ++ s2 ++ s3 ++ ")"
Is there such operator in Oz?

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

Reply via email to