Question: Consider the function e as defined in the following SML code. fun e a ( [ ] , y s ) = y s |

Consider the function e as defined in the following SML code.
fun ea([],ys)=ys
|e a ((x::xs),ys)= if a=x then e (a+1)(xs,(x::ys)) else e a (xs,ys);
What is the type of e?
None of the other answers are correct.
"a ->"b list *"b list -> "a list
int int list * int list int list
"a * "a list -> "a list
int *(int list * int list)-> int list
 Consider the function e as defined in the following SML code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!