Paste: cross-map, cross-each

Author: tylerg
Mode: factor
Date: Mon, 14 Dec 2009 20:40:43
Plain Text |
! Combinators for easy n^2 operations

USING: math.matrices ;

: cross-map ( seq1 seq2 quot -- seq )
  [ cross-zip concat ] dip { } assoc>map ;

: cross-each ( seq1 seq2 quot -- )
  [ cross-zip concat ] dip assoc-each ;

Annotation: foiled again!

Author: tylerg
Mode: factor
Date: Mon, 14 Dec 2009 21:02:51
Plain Text |
Use product-each and product-map instead.  Finding the right word just never seems to be easy...

New Annotation

Summary:
Author:
Mode:
Body: