Advertisement
Guest User

hy-group-by

a guest
Jun 16th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.30 KB | None | 0 0
  1. ;; Let s <- [((6, 2018), 6.0), ((10, 2018), 6.0), ((6, 2018), 12.0)])
  2. (list (group-by s first))
  3. ;; >> [((6, 2018), <itertools...), ((10, 2018), <itertools...)
  4. ;; if I try
  5. (list (second (first (list (group-by s first)))))
  6.  
  7. ; I expect the list of elements having (6, 2018) as first element of the tuple
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement