Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Here's my algorithm, the languague is sml fun last(1st) (x::b) = if null x then nil else b; I keep getting this error: stdIn:1.11 Error:
Here's my algorithm, the languague is sml
fun last(1st) (x::b) =
if null x then nil
else b;
I keep getting this error:
stdIn:1.11 Error: non-constructor applied to argument in pattern.
if someone could point in the right direction, once I figure this out I should be able to finish the rest of the lab. Thank you in advance :)
A function last (1st) of type 'a list -> 'a which returns the last element of a given listStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started