Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prelude> myReverse x = drop 9 x ++ " " ++ take 4 $ drop 5 x ++" "++ take 5 x
- <interactive>:7:15: error:
- • Couldn't match expected type ‘[Char] -> t’
- with actual type ‘[Char]’
- • The first argument of ($) takes one argument,
- but its type ‘[Char]’ has none
- In the expression:
- drop 9 x ++ " " ++ take 4 $ drop 5 x ++ " " ++ take 5 x
- In an equation for ‘myReverse’:
- myReverse x
- = drop 9 x ++ " " ++ take 4 $ drop 5 x ++ " " ++ take 5 x
- • Relevant bindings include
- myReverse :: [Char] -> t (bound at <interactive>:7:1)
- <interactive>:7:34: error:
- • Couldn't match expected type ‘[Char]’
- with actual type ‘[a0] -> [a0]’
- • Probable cause: ‘take’ is applied to too few arguments
- In the second argument of ‘(++)’, namely ‘take 4’
- In the second argument of ‘(++)’, namely ‘" " ++ take 4’
- In the expression: drop 9 x ++ " " ++ take 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement