Author: | wobsite |
---|---|
Mode: | factor |
Date: | Sun, 19 Feb 2012 22:46:07 |
! helper function for group-by - takes a sequence and a function of records ! to keys, and returns an associative list of keys to records. ! TODO: might need a swap after the map to get the key-value ordering right. : extract-keys ( seq quot: ( a -- b ) -- alist ) [ dup ] dip map zip ;