Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In my opinion it be nice to write it as a wrapper type thing:

    inDir d action = do
      oldDir <- pwd
      cd newDir
      result <- action
      cd oldDir
      return result
Then you could use it like a python `with` statement. :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: