Skip to content

Instantly share code, notes, and snippets.

@domkm
Last active August 29, 2015 14:05
Show Gist options
  • Save domkm/c2f63ffee17452972494 to your computer and use it in GitHub Desktop.
Save domkm/c2f63ffee17452972494 to your computer and use it in GitHub Desktop.
(require '[automat.core :as a])
(-> [1 2 (a/$ :conj) 3 4 (a/$ :conj)]
(a/compile {:reducers {:conj conj}})
(a/find nil [1 2 3 4])
:value)
;=> (4 2)
(-> [1 a/any (a/$ :conj) 3 4 (a/$ :conj)]
(a/compile {:reducers {:conj conj}})
(a/find nil [1 2 3 4])
:value)
;=> (4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment