In OCaml Programming Language, write a function: val prime_separator : int list -> int list * int list = that takes an integer list as an input, and returns a pair of integer lists where the prime...


In OCaml Programming Language, write a function:


val prime_separator : int list -> int list * int list =


that takes an integer list as an input, and returns a pair of integer lists where the prime numbers are in the first while the composite numbers are in the second returned list.


#prime_separator [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11];;


- : int list * int list = ([11; 7; 5; 3; 2], [10; 9; 8; 6; 4; 1])



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here