-
-
Save ober/9ef5804b239f0c3c94b9 to your computer and use it in GitHub Desktop.
loop/recur
This file contains 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
(defn list-files | |
"Get list of all files in there" | |
(loop [ files #{} ] | |
(let [ hit (s3/list-objects cred "cloudtrail-cs") ] | |
(if (:truncated? hit) | |
(recur (conj files (:objects hit))) | |
files)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment