1. [SOLVED] inversion
- Posted by petelomax Mar 10, 2017
- 1115 views
Is there a standard routine that will convert {1,2,3,4} to {{1},{2},{3},{4}}?
Stupid me, I just needed an extra level of nesting:
?columnize({{1,2,3,4}})
Thanks tom, it is just for init on a silly little rosettacode task.
2. Re: inversion
- Posted by _tom (admin) Mar 10, 2017
- 1073 views
no standard function that I know of
sequence s = { 1, 2, 3, 4 } sequence x = {} for i = 1 to length(s) do x = append(x, { s[ i ]} ) end for ? x --{ -- {1}, -- {2}, -- {3}, -- {4} --}
what is the value of this routine?
_tom