combinators.cleave: ncleave
parent
12d22e593c
commit
28c86d07f5
|
@ -1,8 +1,16 @@
|
|||
|
||||
USING: kernel arrays sequences macros combinators ;
|
||||
USING: kernel combinators quotations arrays sequences locals macros
|
||||
shuffle combinators.lib ;
|
||||
|
||||
IN: combinators.cleave
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
:: [ncleave] ( SEQ N -- quot )
|
||||
SEQ [ [ N nkeep ] curry ] map concat [ N ndrop ] append >quotation ;
|
||||
|
||||
MACRO: ncleave ( seq n -- quot ) [ncleave] ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! Cleave into array
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
|
Loading…
Reference in New Issue