Skip to content

Instantly share code, notes, and snippets.

@luxbock

luxbock/fff.clj Secret

Created June 17, 2016 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxbock/c499f34ffe07c00404da7b2615295057 to your computer and use it in GitHub Desktop.
Save luxbock/c499f34ffe07c00404da7b2615295057 to your computer and use it in GitHub Desktop.
(transform
[ALL (collect-one :foo) (view :bar) REST ALL]
#(mapv + %1 %2)
[{:foo [1 2] :bar [[10] [2 3] [20 30]]}
{:foo [2 3] :bar [[10] [4 5] [40 50]]}
{:foo [3 4] :bar [[10] [6 7] [60 70]]}])
;; => [[[10] [3 5] [21 32]] [[10] [6 8] [42 53]] [[10] [9 11] [63 74]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment