Created
January 21, 2020 07:21
-
-
Save hiepph/3a898041ae89889ca8202b5af60bb025 to your computer and use it in GitHub Desktop.
Haskell useful functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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