there are too many ways to write this function, and there is probably a way
that is better than what I could think of.
#. inv dfh &> ' 'cut 'FF 81 BD A5 A5 BD 81 FF'
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 1
1 0 1 1 1 1 0 1
1 0 1 0 0 1 0 1
1 0 1 0 0 1 0 1
1 0 1 1 1 1 0 1
1 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1
zoom =: ([ * ({.,{:)@:$@:]) $ [:, ([, [ * {:@:$@:]) $"1 #"1
2 zoom #. inv dfh &> ' 'cut 'FF 81 BD A5 A5 BD 81 FF'
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
for every cell in original, a 2x2 copy of that cell is made.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm