(Solved) : 1 15 5 3 Pts Ghci Happens Inputs Give Results Briefly Describe Error S Brief Don T Rewrit Q43944976 . . .
Haskell Programming – Code
Do it in Haskell GHCI
1. [15 = 5 * 3 pts] In ghci, what happens on the inputs below? Give results or briefly describe the error(s). (“Brief” = Don’t rewrite or rephrase the error message; translate/rephrase it into a short bit of English.) a. sin (cos pi) b. cos -1 c. sin cos pi (sqrt . head [sqrtl) 16.0 (Recall: infix dot is function composition) 2. [9 = 3 * 3 pts). What do you get if you delete all the extra and the problematic parentheses from the expressions below? I.e., if an expression doesn’t compile in ghci, figure out which parentheses need to be removed to fix the problem. In any case, drop redundant parentheses to get to the minimum set needed. a. (cos(sqrt(2.5))+((sin) (pi))) (*)(2) b. (1:) ((‘a’: (“b”)) ++ “cd”)) (((([‘c’] ) ++ “(d)”] ) ) c. ([ [l[ 17 ] ) ) )] :((( [])))) Show transcribed image text 1. [15 = 5 * 3 pts] In ghci, what happens on the inputs below? Give results or briefly describe the error(s). (“Brief” = Don’t rewrite or rephrase the error message; translate/rephrase it into a short bit of English.) a. sin (cos pi) b. cos -1 c. sin cos pi (sqrt . head [sqrtl) 16.0 (Recall: infix dot is function composition) 2. [9 = 3 * 3 pts). What do you get if you delete all the extra and the problematic parentheses from the expressions below? I.e., if an expression doesn’t compile in ghci, figure out which parentheses need to be removed to fix the problem. In any case, drop redundant parentheses to get to the minimum set needed. a. (cos(sqrt(2.5))+((sin) (pi))) (*)(2) b. (1:) ((‘a’: (“b”)) ++ “cd”)) (((([‘c’] ) ++ “(d)”] ) ) c. ([ [l[ 17 ] ) ) )] :((( []))))
Expert Answer
Answer to 1. [15 = 5 * 3 pts] In ghci, what happens on the inputs below? Give results or briefly describe the error(s). (“Brief” =…
OR