Sorry, in my original code the declared variables didn't match the function
names. I've fixed that below:
declare  DiffListToList  DiffListFromList

fun {DiffListFromList L}
   case L
   of Elem|nil then Hole in Elem|Hole#Hole
   [] H|T then H|{DListFromList T}
   end
end

fun {DiffListToList DList}
   local List
   in List#nil = DList
      List
   end
end

{Browse [1 2 3 4 5]}
{Browse {DiffListFromList [1 2 3 4 5]}}
{Browse {DiffListToList {DiffListFromList [1 2 3 4 5]}}}

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

Reply via email to