Question: 2, write an F# function elen: int-> ilist-> int which takes a positive integer n and a list , and returns the nth element of

 2, write an F# function elen: int-> ilist-> int which takes

2, write an F# function elen: int-> ilist-> int which takes a positive integer n and a list , and returns the nth element of if the list has at least n elements, and fails (using failwith) with message "Index out of bound" otherwise. For example, elem 2 (L(3, L(21, L(11, E)))) is 21 3. Write an F# function isin: int-> int list-> bool which takes an integer x and a list l and returns true if and only if r occurs in

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!