Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Introspection/Factor/introspection-1.factor
Normal file
9
Task/Introspection/Factor/introspection-1.factor
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
: if-older ( n true false -- )
|
||||
[ build > ] 2dip if ; inline
|
||||
|
||||
: when-older ( n true -- )
|
||||
[ ] if-older ; inline
|
||||
: unless-older ( n false -- )
|
||||
[ [ ] ] dip if-older ; inline
|
||||
|
||||
900 [ "Your version of Factor is too old." print 1 exit ] when-older
|
||||
5
Task/Introspection/Factor/introspection-2.factor
Normal file
5
Task/Introspection/Factor/introspection-2.factor
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"bloop" search [
|
||||
get [
|
||||
"abs" search [ execute( n -- n' ) ] when*
|
||||
] [ 0 ] if*
|
||||
] [ 0 ] if*
|
||||
7
Task/Introspection/Factor/introspection-3.factor
Normal file
7
Task/Introspection/Factor/introspection-3.factor
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
USING: assocs formatting kernel math namespaces ;
|
||||
|
||||
0 0
|
||||
global [
|
||||
nip dup integer? [ + [ 1 + ] dip ] [ drop ] if
|
||||
] assoc-each
|
||||
"There are %d integer variables, the sum is %d\n" printf
|
||||
Loading…
Add table
Add a link
Reference in a new issue