subject

Consider the following Scala function definitions: def f [X, Y] (a:Option[X], g:X=>Y) : Option[Y] = { a match { case None => None case Some (x) => Some (g (x)) } } def index [X] (xs:List[X], n:Int) : Option[X] = { xs match { case Nil => None case y::ys if (n == 0) => Some (y) case _::ys => index (ys, n - 1) } } What is the output of running: f (index (List (10, 11, 12), 5), (n:Int) => n * 2)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
You know the right answer?
Consider the following Scala function definitions: def f [X, Y] (a:Option[X], g:X=>Y) : Option[Y]...
Questions
question
Biology, 07.12.2020 22:50
Questions on the website: 13722363