Nested templated data: Difference between revisions

Content added Content deleted
Line 251: Line 251:


NB. finish the substitutions in one fell swoop
NB. finish the substitutions in one fell swoop
] SUBSTITUTIONS=: (<"1 p) ,. ,@":&.> i.7
┌──────────────┬─┐
│(<'payload#0')│0│
├──────────────┼─┤
│(<'payload#1')│1│
├──────────────┼─┤
│(<'payload#2')│2│
├──────────────┼─┤
│(<'payload#3')│3│
├──────────────┼─┤
│(<'payload#4')│4│
├──────────────┼─┤
│(<'payload#5')│5│
├──────────────┼─┤
│(<'payload#6')│6│
└──────────────┴─┘

[ t =: > (] , (Substitute {:))&.>/(<"1 SUBSTITUTIONS) , < t
[ t =: > (] , (Substitute {:))&.>/(<"1 SUBSTITUTIONS) , < t
┌──┬──┬──┬──────────────┬─┬──────────────┬─┬─┬──┬──────────────┬─┬──────────────┬─┬──────────────┬─┬─┬──────────────┬─┬─┐
┌──┬──┬──┬──────────────┬─┬──────────────┬─┬─┬──┬──────────────┬─┬──────────────┬─┬──────────────┬─┬─┬──────────────┬─┬─┐
Line 304: Line 321:
└───────────┴──────────────────────────┴─┘
└───────────┴──────────────────────────┴─┘
</pre>
</pre>

=={{header|Julia}}==
=={{header|Julia}}==
The array structure needs to be specified as Any type of data, to allow assignment of String to positions in the array originally containing integers.
The array structure needs to be specified as Any type of data, to allow assignment of String to positions in the array originally containing integers.