I am new to haskell plz dnt mind
scan :: [Char] -> Token
scan ('i':'f':tl) = IfKeyword
scan ('t':'h':'e':'n':tl) = ThenKeyword
scanp :: [Char] -> [Token]
scanp t = sequence (map scan t)
when I call scan on my file which has "if then"
then its just printing if as IfKeyword ..its nt talking the then word
I tried using sequence but its nt working..Can you please help me out..
I have to get the output as a list of tokens
[IfKeyword, ThenKeyword]