Question: Write an Oz program which returns the first element of a list and the last element of that list. For example, if the input is
Write an Oz program which returns the first element of a list and the last element of that list. For example, if the input is [2 ~5 3 ~1 6 ~3 9 4], the output should be 2#4, if the input is [4 ~2], the output should be 4#~2, and if the input is [2], the output should be 2#2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
