subject

(* problem 11 [5 points] use map to write a function thattakes an int list and an int and multiplies everyentry in the list by the int. you may define auxiliary functions that arecalled by the times_x function. if you defineauxiliary functions, do not use the samename with any pre-declared function inthis homework. *)(* auxiliary functions (if defined) start here *)(* auxiliary functions (if defined) end here *)let times_x (x: int) (lst: int list) : int list =(* your code start here *)[-1](* your code end here *); ; (* test case: all results should be true *)(times_x 5 [1; 2; 3]) = [5; 10; 15]; ; (times_x 5 []) = []; ; (times_x 2 [1; 2; 3]) = [2; 4; 6]; ; in ocaml

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
Write a function 'music_func' that takes 3 parameters -- music type, music group, vocalist -- and prints them all out as shown in the example below. in case no input is provided by the user, the function should assume these values for the parameters: "classic rock", "the beatles", "freddie mercury". for example: input: alternative rock,pearl jam,chris cornell output: the best kind of music is alternative rock the best music group is pearl jam the best lead vocalist is chris cornell note: the print statements will go inside the for example: print("the best kind of music is"
Answers: 2
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
You know the right answer?
(* problem 11 [5 points] use map to write a function thattakes an int list and an int and multiplies...
Questions
question
Mathematics, 27.02.2020 00:10
Questions on the website: 13722362