% $Id: DiffList.oz,v 1.1 2007/10/22 07:02:50 leavens Exp leavens $ declare fun {ListToDiffList Ls} case Ls of E|Es then Es1#Es2 = {ListToDiffList Es} in (E|Es1)#Es2 else X in X#X end end fun {DiffListToList DL} LS#V = DL in % Can't pattern match against LS unless it's determined % as will suspend if we pattern match against an unbound variable. if {IsDet LS} then case LS of E|Es then E|{DiffListToList Es#V} else nil end else nil end end fun {AppendD D1 D2} S1#V1 = D1 S2#V2 = D2 in V1=S2 S1#V2 end