Computers and Technology

Declare a function f: int -> bool such that f(n) = true exactly when n is divisible by 2 or divisible by 3 but not divisible by 5. Write down the expected values of f(24), f(27), f(29) and f(30) and compare with the result. Hint 1: n is divisible by q when n%q = 0. Hint 2: remember the implicit parameter. 11. Write a function that has the type ’a list * ’a list-> bool, where ’a implements comparison. 12. Declare an F# function notDivisible: int * int -> bool where notDivisible(d, n) is true if and only if d is not a divisor of n. For example, notDivisible(2,5) is true and notDivisible(3,9) is false. 13. Write an F# function evenN: int -> int list such th

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:40, Tyrant4life
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
image
Computers and Technology, 22.06.2019 19:10, sammigrace5820
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
image
Computers and Technology, 22.06.2019 19:30, mitalichavez1
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, depression4eternity
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
Do you know the correct answer?
Declare a function f: int -> bool such that f(n) = true exactly when n is divisible by 2 or divis...

Questions in other subjects: