You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module PrincipalType (typeA, typeB, typeC, typeD, typeE) where
{-
** THE TASK **
Implement functions with the following types. You are not allowed to use undefined or error.
Haskell is able to infer the most general type for a function that has been defined in it. For example
λ> g x y = x y
λ> :t g
g :: (t1 -> t2) -> t1 -> t2
For the following questions, define a function so that if we were to type it into haskell, and ask for its type using ":t" we would get types from A, B, C, D, and E, up to renaming variables.