I am working on learning Oz, but with very little online resources apart from the official documentation I am REALLY struggling to find out how to scan through a list in order to create a working partition function. In this example im just trying to return the first digit of the list. How would I do this?
declare
fun {Partition ?X}
case X of nil then nil
else
{Show "HELLO!"}
RETURN FIRST DIGIT OF X HERE?
end
end
in
{Show {Partition [5 1 7 3 4 6 5]}}