Question: Please help import this function in Haskell, use the spec and sample run below. Please note the output also has a Just before the output

Please help import this function in Haskell, use the spec and sample run below. Please note the output also has a "Just" before the output Int and "Nothing" if there is no Max value

Thanks!

 Please help import this function in Haskell, use the spec and

maxNew maxNew:: [Int] -> [Int] -> Maybe Int Given a list of integers (xs), and a list of old integers (olds), find and return Just the largest integer in xs that isn't also in olds. When there is no such number, return Nothing Homework3> maxNew [1,2,3,4,5,6] [5,6] Just 4 Homework3> maxNew [1,5,3,4,6,2,4,4] 5,61 Just 4 *Homework3> maxNew [-5,-4,-3] -4 Just (-3) Homework3> maxNew [1,2,3] [1,2,3] Nothing Homework3> maxNew [1,1,1,1,3,3,3,3] 11,3 Nothing maxNew maxNew:: [Int] -> [Int] -> Maybe Int Given a list of integers (xs), and a list of old integers (olds), find and return Just the largest integer in xs that isn't also in olds. When there is no such number, return Nothing Homework3> maxNew [1,2,3,4,5,6] [5,6] Just 4 Homework3> maxNew [1,5,3,4,6,2,4,4] 5,61 Just 4 *Homework3> maxNew [-5,-4,-3] -4 Just (-3) Homework3> maxNew [1,2,3] [1,2,3] Nothing Homework3> maxNew [1,1,1,1,3,3,3,3] 11,3 Nothing

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!