Created
May 15, 2017 07:37
-
-
Save noncom/e2866837dcded29fdffe4958273cd44e 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
(let [fs [+ - *] | |
cbd [c b d] | |
m (x a b c d)] | |
(for [f1 fs f2 fs f3 fs, | |
o-1 cbd o-2 cbd o-3 cbd] | |
(let [res (f1 (f2 (f3 m o-1) o-2) o-3)] | |
[(make res a) [f1 f2 f3] [o-1 o-2 o-3] res]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Hopefully) generic version using https://github.com/clojure/math.combinatorics