Nested templated data: Difference between revisions

Line 251:
 
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
┌──┬──┬──┬──────────────┬─┬──────────────┬─┬─┬──┬──────────────┬─┬──────────────┬─┬──────────────┬─┬─┬──────────────┬─┬─┐
Line 304 ⟶ 321:
└───────────┴──────────────────────────┴─┘
</pre>
 
=={{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.
Anonymous user