remove unused nspin generalization
							parent
							
								
									6c87f20286
								
							
						
					
					
						commit
						02f209b30a
					
				| 
						 | 
					@ -338,12 +338,6 @@ HELP: ntuck
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
{ $description "A generalization of " { $link tuck } " that can work for any stack depth. The top item will be copied and placed " { $snippet "n" } " items down on the stack." } ;
 | 
					{ $description "A generalization of " { $link tuck } " that can work for any stack depth. The top item will be copied and placed " { $snippet "n" } " items down on the stack." } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HELP: nspin
 | 
					 | 
				
			||||||
{ $values
 | 
					 | 
				
			||||||
    { "n" integer }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
{ $description "A generalization of " { $link spin } " that can work for any stack depth. The top " { $snippet "n" } " items will be reversed in order." } ;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ARTICLE: "sequence-generalizations" "Generalized sequence operations"
 | 
					ARTICLE: "sequence-generalizations" "Generalized sequence operations"
 | 
				
			||||||
{ $subsections
 | 
					{ $subsections
 | 
				
			||||||
    narray
 | 
					    narray
 | 
				
			||||||
| 
						 | 
					@ -364,7 +358,6 @@ ARTICLE: "shuffle-generalizations" "Generalized shuffle words"
 | 
				
			||||||
    nnip
 | 
					    nnip
 | 
				
			||||||
    ndrop
 | 
					    ndrop
 | 
				
			||||||
    ntuck
 | 
					    ntuck
 | 
				
			||||||
    nspin
 | 
					 | 
				
			||||||
    mnswap
 | 
					    mnswap
 | 
				
			||||||
    nweave
 | 
					    nweave
 | 
				
			||||||
} ;
 | 
					} ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,8 +26,6 @@ IN: generalizations.tests
 | 
				
			||||||
{ 0 } [ 0 1 2 3 4 4 ndrop ] unit-test
 | 
					{ 0 } [ 0 1 2 3 4 4 ndrop ] unit-test
 | 
				
			||||||
[ [ 1 ] 5 ndip ] must-infer
 | 
					[ [ 1 ] 5 ndip ] must-infer
 | 
				
			||||||
[ 1 2 3 4 ] [ 2 3 4 [ 1 ] 3 ndip ] unit-test
 | 
					[ 1 2 3 4 ] [ 2 3 4 [ 1 ] 3 ndip ] unit-test
 | 
				
			||||||
[ 5 nspin ] must-infer
 | 
					 | 
				
			||||||
[ 1 5 4 3 2 ] [ 1 2 3 4 5 4 nspin ] unit-test
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ 1 2 3 4 5 [ drop drop drop drop drop 2 ] 5 nkeep ] must-infer
 | 
					[ 1 2 3 4 5 [ drop drop drop drop drop 2 ] 5 nkeep ] must-infer
 | 
				
			||||||
[ 1 2 3 4 5 2 '[ drop drop drop drop drop _ ] 5 nkeep ] must-infer
 | 
					[ 1 2 3 4 5 2 '[ drop drop drop drop drop _ ] 5 nkeep ] must-infer
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,6 +139,3 @@ MACRO: nbi-curry ( n -- )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: nappend ( n -- seq ) narray concat ; inline
 | 
					: nappend ( n -- seq ) narray concat ; inline
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MACRO: nspin ( n -- )
 | 
					 | 
				
			||||||
    [ [ ] ] swap [ swap [ ] curry compose ] n*quot [ call ] 3append ;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue