Question: 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

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 nonempty

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!