Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In haskell Write a function mostOdds :: [[Int]] -> [Int]. It will takes a list of lists of integers, and will return that list of
In haskell
Write a function mostOdds :: [[Int]] -> [Int]. It will takes a list of lists of integers, and will return that list of integers that contains the most number of odd numbers. For example, in the below case, the second list, [11,15,10,17], contains 3 odd numbers, while the first list contains only one, and the third list contains only two. *Main> mostOdds [[1,10,20,30,40],[11,15,10,17] , [77,4,4,11]] [11,15,10,17] Your function must not use recursion. You should use at least one of map, filter, and foldi. You may also want to use length. You may write an additional helper function, if appropriate. If the input contains more than one list with the most number of odds, you may return any one of them. You may assume that the input list is nonemptyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started