Skip to content

Instantly share code, notes, and snippets.

@hiepph
Created January 21, 2020 07:21
Show Gist options
  • Save hiepph/3a898041ae89889ca8202b5af60bb025 to your computer and use it in GitHub Desktop.
Save hiepph/3a898041ae89889ca8202b5af60bb025 to your computer and use it in GitHub Desktop.
Haskell useful functions
import Data.Char (isSpace)
trim :: String -> String
trim = f . f
where f = reverse . dropWhile isSpace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment