ztellman / automat

better automata through combinators
588 stars 50 forks source link

reducer functions are called with coerced input #9

Open domkm opened 10 years ago

domkm commented 10 years ago
(-> (a/interpose-$ :conj (vec "abc"))
    (a/compile {:reducers {:conj conj}})
    (a/find [] (seq "abc"))
    :value)
;=> [97 98 99]

(-> (a/interpose-$ :conj [\a :b "c"])
    (a/compile {:reducers {:conj conj}})
    (a/find [] [\a :b "c"])
    :value)
;=> [97 :b]

I don't know why 99/"c" is missing in the second example.

domkm commented 9 years ago

This is fixed, at least in #16. These tests should probably be added once #16 is merged.