You're fighting rank, I think. Try  (~: *. (0&= @ |~))"0/~ 5 9 2 8

Or, note that your first expression gives the same result as 0 = |~/~
5 9 2 8 and use two /~ parts.

Thanks,

-- 
Raul


On Sat, Dec 2, 2017 at 2:34 PM, Joe Bogner <[email protected]> wrote:
> I was working on my adventofcode solution earlier today and was stuck and
> still can't figure out why this doesn't work.
>
> Take this expression.
>
> (0&= @ |~)/~ 5 9 2 8
>
> 1 0 0 0
>
> 0 1 0 0
>
> 0 0 1 0
>
> 0 0 1 1
>
>
> And this expression
>
>
> (~:)/~ 5 9 2 8
>
> 0 1 1 1
>
> 1 0 1 1
>
> 1 1 0 1
>
> 1 1 1 0
>
>
> Why can't I combine it into a single fork to AND the two tines?
>
>
> (~: *. (0&= @ |~))/~ 5 9 2 8
>
> 0 0 0 0
>
>
>
> Instead I have to do this
>
>
> (~:/~ *. (0&= @ |~)/~) 5 9 2 8
>
> 0 0 0 0
>
> 0 0 0 0
>
> 0 0 0 0
>
> 0 0 1 0
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to