Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save green-coder/5f0023ca80446784f36ebb00a18622a6 to your computer and use it in GitHub Desktop.
Save green-coder/5f0023ca80446784f36ebb00a18622a6 to your computer and use it in GitHub Desktop.
(def my-cat
(fn [rf]
(fn ([] (rf))
([result] (rf result))
([result input]
(reduce (fn [acc val]
(if (or (= val :fish)
(= val :heat))
acc
(rf acc val)))
result
input)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment