Why can't Haskell function return a list

Published: 4/10/2017
Why can't Haskell function return a list
Source: STACKOVERFLOW.COM

What is wrong with that: partin a = [floor a, a-floor a] Error : <interactive>:342:1: error: • Ambiguous type variable ‘a0’ arising from a use of ‘print’ prevents the constraint ‘(Show a0)’ from being solved. Probable fix: use a type annotation to specify what ‘a0’ should be. These potential instances exist: instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in

Read more
Related news
Comment