Skip to content
Christophe Grand edited this page Sep 20, 2016 · 1 revision

xforms makes really easy and efficient to work with pairs.

Clojure maps do not use map entries internally, pairs are only allocated when you call find or iterate over a map. reduce-kv avoids pair allocation by expecting a reducing function which accepts three arguments ([acc k v]).

xforms introduces the KvRfable protocol. It allows a transducer to determine whether its downstream reducing function accepts pairs (as discrete arguments) or not.