Data update

This commit is contained in:
Ingy döt Net 2023-10-02 18:11:16 -07:00
parent 796d366b97
commit 35bcdeebf8
504 changed files with 7045 additions and 610 deletions

View file

@ -0,0 +1,15 @@
[ this ] is null ( --> [ )
[ 0 unrot
witheach
[ dip
[ behead rot ]
* + swap ]
drop ] is [a]-> ( [ [ --> n )
[ [] unrot
reverse
witheach
[ /mod rot
join swap ]
drop ] is ->[a] ( n [ --> [ )

View file

@ -0,0 +1,15 @@
[ dip nested
reverse
witheach
[ of i if nested ] ] is array ( [ --> a )
[ witheach peek ] is [peek] ( [ a --> x )
[ dup dip
[ rot dip
[ -1 split drop
witheach
[ dip dup peek ] ] ]
reverse
witheach
[ dip swap poke ] ] is [poke] ( x a [ --> a )

View file

@ -0,0 +1,18 @@
[ swap nested
over 1 swap
witheach *
of
2 pack ] is array ( x [ --> [ )
[ 0 peek ] is [layout] ( [ --> [ )
[ 1 peek size ] is [size] ( [ --> n )
[ swap unpack
unrot [a]-> peek ] is [peek] ( [ a --> x )
[ swap unpack
dip [ tuck [a]-> ]
rot dip
[ swap poke ]
swap 2 pack ] is [poke] ( x a [ --> a )

View file

@ -0,0 +1,23 @@
null ' [ 5 4 3 2 ] array
say "[ 5 4 3 2 ] array created, initialised with nulls."
cr
cr
2 swap ' [ 3 2 1 0 ] [poke]
say "2 stored in [ 3 2 1 0 ]."
cr
4 swap ' [ 4 3 2 1 ] [poke]
say "4 stored in [ 4 3 2 1 ]."
cr
8 swap ' [ 4 3 2 1 ] [poke]
say "8 stored in [ 4 3 2 1 ]."
cr
cr
dup ' [ 0 0 0 0 ] [peek] echo
say " copied from [ 0 0 0 0 ]."
cr
dup ' [ 3 2 1 0 ] [peek] echo
say " copied from [ 3 2 1 0 ]."
cr
' [ 4 3 2 1 ] [peek] echo
say " copied from [ 4 3 2 1 ]."
cr