In OCaml Programming Language:
Use the built-in higher order functions and write a non-recursive function
val listdiff : ’a list -> ’a list -> ’a list = that, given 2 lists, returns a third, containing elements of the first list that are not in the second list.# listdiff [1;2;2;6;3;9;1;4;6] [2;3];;- : int list = [1; 6; 9; 1; 4; 6]
that, given 2 lists, returns a third, containing elements of the first list that are not in the second list.
# listdiff [1;2;2;6;3;9;1;4;6] [2;3];;
- : int list = [1; 6; 9; 1; 4; 6]
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here