mylast :: [a]->[a]
mylast [] = []
mylast [z] = [z]
mylast [z,y] = [y, z]
mylast [z, y, m] = [m,y,z]
mylast (z:y:m) = mylast m ++ [y,z]
mylast :: [a]->[a]
mylast (x:xs) = mylast xs ++ [x]
mylast [] = []
readIntList :: IO [Int]
readIntList = do
line <- getLine
let ws = words line
ints = map read ws
return ints
readIntList :: IO [Int]
readIntList = fmap (map read . words) getLine
instance Show ExE where
show exe = case exe of
ExData i -> "ExData " ++ show i
e1 :$: e2 -> show e1 ++ " :$: " ++ show e2