-
-
Save amalloy/349eb71c83e9bd98d04c 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
(fn [s e] | |
(->> [[s]] | |
(iterate #(mapcat (fn [[c :as p]] | |
(for [f [* / +] | |
:let [n (f c 2)] | |
:when (integer? n)] | |
(cons n p))) | |
%)) | |
(map #(filter (comp #{e} first) %)) | |
(filter seq) | |
ffirst | |
count)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment