Fork me on GitHub
#code-reviews
<
2018-08-04
>
kazuwal11:08:38

@holyjak A little late. Sets implement the function interface thus

(filter #{{:producer "Ferrari"}} cars) => ({:producer "Ferrari"})
is the idiomatic way for doing this. You can also use
keep
and
some
in replacement of
filter
eg
(some #{{:producer "Ferrari"}} cars) => {:producer "Ferrari"}
. These examples assume your cars var is defined as
(def cars [{:producer "Ferrari"}
           {:producer "Porsche"}
           {:producer "Mazda"}])

👍 4