Answered step by step
Verified Expert Solution
Question
1 Approved Answer
coding language Haskell Help with 1(b,c) and 2(a,b) ( [4 pts) is the following a legal list value in Haskell? If so, what is its
coding language Haskell
Help with 1(b,c) and 2(a,b)
( [4 pts) is the following a legal list value in Haskell? If so, what is its type? [Just. 1, Just 2, Nothing] [ No all valme must be at the same type 4 (d) [5 pts] Consider the following Haskell data type. What would be a plausible type in C for representing the same information? Write down the comparable C type. data Values - MyDouble Double | MyInt Int | MyString (Char] Double my Doudle Int My Ent string = "char" X a 1x1 2) (14 pts] Consider the following Haskell mystery function: X70 x 7a X60 mystery mystery a b [] = (a,b) mystery a b (x:xs) | x>0 = mystery (x:a) b xs | otherwise = mystery a (x:b) xs from the fail of the (a) [6 pts) Is function mystery tail recursive? Briefly explain. No it is not, berause it doesn't start list This function is tail recursive 18 (b) (8 pts) Evaluate the following expressions and write the values they evaluate to. mystery [] [] [1,2,3,-4,-5,8,-3] mystery (0) 0 11,2,3,4,5) ([1,2,451. [1] answers must be tuples and in reverse orderStep 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