Created
May 30, 2018 12:56
-
-
Save green-coder/5f0023ca80446784f36ebb00a18622a6 to your computer and use it in GitHub Desktop.
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
(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