Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Below are several type definitions. You do not need to know any of the implementations or type definitions that are omitted in order to solve
Below are several type definitions. You do not need to know any of the implementations or type definitions that are omitted in order to solve the problems. You should assume that all of the undefined types are unique data types (that is, they're not just type synonyms of Int or Float). data Shape = Circle Radius | Rectangle Length Width | Scale Float shape one :: Radius two :: Length three :: Width pi :: Float origin :: Position area :: Shape -> Float draw :: Position -> Shape -> HTML flip :: (a -> b -> c) -> b -> a -> C :: (b-> C) -> (a - b) -> a -> C (.) For each of the following problems, write the type of the expression in the blank provided, or write "type error" if the expression is not type correct. 1. Scale (area (Circle one)) (Rectangle two three) Type: : 2. area Rectangle two three Type: 3. flip Rectangle three two Type: 4. flip draw (Rectangle two three) Type: 5. draw origin . Scale pi Type
Step 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