Question: Oz programming Try the version of Length as presented in lecture notes. Since X from the pattern is not used in the right-hand side of
Oz programming Try the version of Length as presented in lecture notes. Since X from the pattern is not used in the right-hand side of the case, it can be replaced with the universal operator (_ will not be bound to anything). Write other version, using the equality operator. Is there any more efficient way to implement Length?
Orginal version of length from power point :
fun {Length Xs}
case Xs
of nil then 0
[] X|Xr then 1 + {Length Xr}
end
end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
