 
 ! General spread
 
-USING: sequences macros ;
-
 MACRO: spread ( seq -- )
   dup
     [ drop [ >r ] ]        map concat


USING: kernel ;

IN: combinators.cleave


: 2bi ( obj obj quot quot -- val val ) >r 2keep r> call ; inline

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! General cleave

MACRO: cleave ( seq -- )
  dup
    [ drop [ dup ] ] map concat
  swap
  dup
    [ drop [ >r ] ]  map concat
  swap
    [ [ r> ] append ] map concat
  3append
    [ drop ]
  append ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! The spread family
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

