parseComplex :: Parser LispVal
parseComplex = try $ numberfy <$> real <*> imag
  where
    real = read . fromMaybe "0" <$> (optionMaybe . try $ numFollowedBy '+')
    imag = read <$> numFollowedBy 'i'
    numberfy r i = Complex (r :+ i)
    numFollowedBy c = (parseFloatString <|> many1 digit) <* char c
parseComplex :: Parser LispVal
parseComplex = try $ numberfy <$> real <*> imag
  where
    real = read . fromMaybe "0" <$> (optionMaybe . try $ numFollowedBy '+')
    imag = read <$> numFollowedBy 'i'
    numberfy r i = Complex (r :+ i)
    numFollowedBy c = (parseFloatString <|> many1 digit) <* char c
parseComplex = try $ numberfy <$> real <*> imag
  where
    real = read . fromMaybe "0" <$> (optionMaybe . try $ numFollowedBy '+')
    imag = read <$> numFollowedBy 'i'
    numberfy r i = Complex (r :+ i)
    numFollowedBy c = (parseFloatString <|> many1 digit) <* char c