1 Prime number separation 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...


In OCaml Programming Language:


1 Prime number separation<br>Write a function<br>val prime_separator : int list -> int list * int list = <fun><br>that takes an integer list as an input, and returns a pair of integer lists where the<br>prime numbers are in the first while the composite numbers are in the second<br>returned list.<br>#prime_separator [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11];;<br>: int list * int list =<br>([11; 7; 5; 3; 2], [10; 9; 8; 6; 4; 1])<br>

Extracted text: 1 Prime number separation 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 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here