Created
October 23, 2015 14:07
-
-
Save missingfaktor/dc7d5de59123e13d930f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| user=> (defn foobar [xs] | |
| #_=> (match xs (clauses !empty (fn [] :empty) | |
| #_=> (!cons (!constant 3) !empty) (fn [] :singleton-with-3) | |
| #_=> (!cons !var !any) (fn [head] head)))) | |
| #'user/foobar | |
| user=> (foobar []) | |
| :empty | |
| user=> (foobar [3]) | |
| :singleton-with-3 | |
| user=> (foobar [3 9]) | |
| 3 | |
| user=> (foobar [3 9 11]) | |
| 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment