How about
1 0 1 0 1 0 (#~ ((-: & 0 1 0)"1 @: ({~ & z)))~ z
?
You can then "simplify":
First the hook (and {~&z)
([ #~ -:&0 1 0"1@:(z&{)@])~
([ #~ -:&0 1 0"1@:(z&{)@])~
Then ~ can be "distributed" over the resulting fork:
[~ #~ -:&0 1 0"1@:(z&{)@(]~)
] #~ -:&0 1 0"1@:(z&{)@[
You can keep going;
From bonding to forks:
] #~ (] -: 0 1 0"_)"1@:(z { ])@[
Composition and -: commutativity:
] #~ (0 1 0 -: ])"1@:(z { ]@[)
Because 1=#$0 1 0:
] #~ (0 1 0 -:"1 ])@:(z { [)
Trains:
] #~ (0 1 0 -:"1 ]@:(z { [))
] #~ 0 1 0 -:"1 ]@:(z { ])
] #~ 0 1 0 -:"1 z { [
Can't get it any simpler.
Cheers,
Louis
> On 4 Jun 2017, at 03:45, Michael Rice <[email protected]> wrote:
>
> z (#~ ((-: & 0 1 0)"1 @: ({~ & z))) 1 0 1 0 1 0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm