Question: Using Standard ML language to solve the problem using RECURSIVE definitions . . Write a function get_nth that takes an int list (xs: int list)
Using Standard ML language to solve the problem using RECURSIVE definitions.

. Write a function get_nth that takes an int list (xs: int list) and an int (n : int) and returns the nth element of xs. Take into account the case where xs may have too few elements; your function may return NONE for such lists and return SOME x for lists having enough elements, where x is the nth element of xs. For example, get_nth (1355, 2017, 55, 10],3) ->SOME 55 get nth (1355, 2017, 55, 10], 6 ->NONE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
