Given a type String, should return Strings eg. given the string "Second" should return -- > "First" , "Third" That is what is before this string and what is after it. (symmetry relationship in some sense)
Here's what I have tried so far.
between :: String -> (String, String)
between "Second" = (“First”,"Third")
between "Third" = (“Second”,"Fourth")
between "Fourth" = (“Third”, "Fifth")
The other one I tried
data Positions = First | Second | Third | Fourth | Fifth |
between :: Positions -> (String,String)
between Second = (“First”,"Third")
between Third = (“Second”,"Fourth")
between Fourth = (“Third”, "Fifth")
Recevied different types of error eg. Undefined variable "?" , Improperly terminated string and Equations give different arities.
How would you fix this in order for it to function well, without any errors?
“and”) are a copy&paste problem or you are actually using these quotes in your source file?