Family Day update

This commit is contained in:
Ingy döt Net 2020-02-17 23:21:07 -08:00
parent aac6731f2c
commit 9ad63ea473
2442 changed files with 39761 additions and 8255 deletions

View file

@ -0,0 +1,4 @@
USING: io kernel math.ranges prettyprint random sequences ;
10 [ 20 [ 20 [1,b] random ] replicate ] replicate ! make a table of random values
[ [ dup pprint bl 20 = ] find nl drop ] find 2drop ! print values until 20 is found

View file

@ -0,0 +1,7 @@
USING: continuations io kernel math.ranges prettyprint random
sequences ;
10 [ 20 [ 20 [1,b] random ] replicate ] replicate ! make a table of random values
[
[ [ dup pprint bl 20 = [ return ] when ] each nl ] each ! print values until 20 is found
] with-return drop

View file

@ -1,10 +0,0 @@
USING: continuations formatting io kernel math.ranges
prettyprint random sequences ;
IN: rosetta-code.loops-nested
: rand-table ( -- seq )
10 [ 20 [ 20 [1,b] random ] replicate ] replicate ;
rand-table [
[ [ dup "%4d" printf 20 = [ return ] when ] each nl ] each
] with-return drop