Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
USING: formatting kernel literals math sequences sequences.deep ;
|
||||
IN: rosetta-code.nested-template-data
|
||||
|
||||
CONSTANT: payloads $[ 7 <iota> [ "Payload#%d" sprintf ] map ]
|
||||
|
||||
: insert-payloads ( template -- data-structure )
|
||||
[ dup fixnum? [ payloads ?nth ] when ] deep-map ;
|
||||
|
||||
{ { { 1 2 }
|
||||
{ 3 4 1 }
|
||||
5 } }
|
||||
|
||||
{ { { 1 2 }
|
||||
{ 10 4 1 }
|
||||
5 } }
|
||||
|
||||
[ dup insert-payloads "Template: %u\nData Structure: %u\n"
|
||||
printf ] bi@
|
||||
Loading…
Add table
Add a link
Reference in a new issue