-- | Implementing 'cons'.
-- Rules:
--   (cons x '()) = (x)
--   (cons x '(a b c ...)) = (x a b c ...)
--   (cons x '(a b c . d)) = (x a b c . d)
--   (cons x y) = (x . y)
--   (cons x) => error
cons :: [LispVal] -> ThrowsError LispVal
cons [x1, List []] = return $ List [x1]
cons :: [LispVal] -> ThrowsError LispVal
cons [x1, List []] = return $ List [x1]
cons [x1, List []] = return $ List [x1]