Remove word moved to core
							parent
							
								
									a09e216582
								
							
						
					
					
						commit
						6458d6e946
					
				| 
						 | 
					@ -83,15 +83,6 @@ HELP: count
 | 
				
			||||||
    "50"
 | 
					    "50"
 | 
				
			||||||
} ;
 | 
					} ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HELP: all-unique?
 | 
					 | 
				
			||||||
{ $values { "seq" sequence } { "?" "a boolean" } }
 | 
					 | 
				
			||||||
{ $description "Tests whether a sequence contains any repeated elements." }
 | 
					 | 
				
			||||||
{ $example
 | 
					 | 
				
			||||||
    "USE: combinators.lib"
 | 
					 | 
				
			||||||
    "{ 0 1 1 2 3 5 } all-unique? ."
 | 
					 | 
				
			||||||
    "f"
 | 
					 | 
				
			||||||
} ;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
HELP: &&
 | 
					HELP: &&
 | 
				
			||||||
{ $values { "quots" "a sequence of quotations with stack effect " { $snippet "( ... -- ... ? )" } } { "?" "a boolean" } }
 | 
					{ $values { "quots" "a sequence of quotations with stack effect " { $snippet "( ... -- ... ? )" } } { "?" "a boolean" } }
 | 
				
			||||||
{ $description "Calls each quotation in turn; outputs " { $link f } " if one of the quotations output " { $link f } ", otherwise outputs " { $link t } ". As soon as a quotation outputs " { $link f } ", evaluation stops and subsequent quotations are not called." } ;
 | 
					{ $description "Calls each quotation in turn; outputs " { $link f } " if one of the quotations output " { $link f } ", otherwise outputs " { $link t } ". As soon as a quotation outputs " { $link f } ", evaluation stops and subsequent quotations are not called." } ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,8 +7,6 @@ IN: temporary
 | 
				
			||||||
[ 50 ] [ 100 [1,b] [ even? ] count ] unit-test
 | 
					[ 50 ] [ 100 [1,b] [ even? ] count ] unit-test
 | 
				
			||||||
[ 50 ] [ 100 [1,b] [ odd? ] count ] unit-test
 | 
					[ 50 ] [ 100 [1,b] [ odd? ] count ] unit-test
 | 
				
			||||||
[ 328350 ] [ 100 [ sq ] sigma ] unit-test
 | 
					[ 328350 ] [ 100 [ sq ] sigma ] unit-test
 | 
				
			||||||
[ f ] [ { 0 1 1 2 3 5 } all-unique? ] unit-test
 | 
					 | 
				
			||||||
[ t ] [ { 0 1 2 3 4 5 } all-unique? ] unit-test
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
: infers? [ infer drop ] curry catch not ;
 | 
					: infers? [ infer drop ] curry catch not ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,8 +98,6 @@ MACRO: nfirst ( n -- )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: count ( seq quot -- n ) [ 1 0 ? ] compose sigma ; inline
 | 
					: count ( seq quot -- n ) [ 1 0 ? ] compose sigma ; inline
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: all-unique? ( seq -- ? ) [ prune ] keep [ length ] 2apply = ;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 | 
					! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 | 
				
			||||||
! short circuiting words
 | 
					! short circuiting words
 | 
				
			||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 | 
					! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue