Skip to content

Instantly share code, notes, and snippets.

@halgari
Last active December 20, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halgari/6122107 to your computer and use it in GitHub Desktop.
Save halgari/6122107 to your computer and use it in GitHub Desktop.
(defn close-at-end [x file]
(if x
(cons (first x) (lazy-seq (close-at-end (next x) file)))
(do (.close file)
nil)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment