Paste: non-inline?

Author: wobsite
Mode: factor
Date: Sun, 19 Feb 2012 22:46:07
Plain Text |
! 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 ;

New Annotation

Summary:
Author:
Mode:
Body: