Skip to content

Instantly share code, notes, and snippets.

@pharpend
Created December 24, 2019 04:22
Show Gist options
  • Save pharpend/94f79ef416f38c1e454175d7e9635b4d to your computer and use it in GitHub Desktop.
Save pharpend/94f79ef416f38c1e454175d7e9635b4d to your computer and use it in GitHub Desktop.
hindent demo
myFunction :: [String] -> IO ()
myFunction args=
do
let val=fmap (+3)$fmap length args
blah<-readFile "foo.txt"
let myNewList=[blah,
mconcat(fmap show val ) ,"hello"]
print myNewList
-- Formatted to
myFunction :: [String] -> IO ()
myFunction args = do
let val = fmap (+ 3) $fmap length args
blah <- readFile "foo.txt"
let myNewList = [blah, mconcat (fmap show val), "hello"]
print myNewList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment