Question: Computer Science SML Problems - Write a function makeLst of type int -> int list that takes as input a positive integer n and returns

Computer Science SML

Computer Science SML Problems - Write a function makeLst of type int

Problems - Write a function makeLst of type int -> int list that takes as input a positive integer n and returns the list [1, 2, ..., n]. Your function does not need to work with non-positive integer. - Write a function removeMult of type int list * int -> int list that removes all multiples of a given integer from a list. - Write a function primes of type int -> int list that outputs a list of all prime numbers which are smaller than or equal to a given integer n > 2. You should use the sieve of Eratosthenes and previously defined functions to calculate these numbers. Do not use any pre-implemented functions of the form List.xyz(...)

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!