[Jprogramming] AoC Day 11 - something is wrong
Raul Miller
rauldmiller at gmail.com
Sat Dec 16 20:04:20 UTC 2017
How is it supposed to work for a sequence like 'W N SE'?
Thanks,
--
Raul
On Sat, Dec 16, 2017 at 2:48 PM, Brian Schott <schott.brian at gmail.com> wrote:
> Oh, I forgot to mention another peculiarity regarding
> the result shown. (Actually a hint of this peculiarity was
> included at the bottom, where I mistakenly included a
> line of code regarding `test2 =: ...... test`.)
>
> I am referring to the large number of Ns and SEs remaining
> in the **culled** list of directions I called `test`.
> It seems to me that `all` should have been able to combine
> 133 of the Ns and SEs into 133 more NEs, and left only
> the 110 Ns with 696 NEs. But it didn't.
>
> Can anyone see why this happened?
>
> On Sat, Dec 16, 2017 at 2:32 PM, Brian Schott <schott.brian at gmail.com>
> wrote:
> [snip]
>
> #;:test2 =: ((all :: ])&. ;:)^: _ test
>> 939
>> (<'NE') i.~;: test
>> 0
>> (<'SE') i.~;: test
>> 649
>> (<'N') i.~;: test NB. this result should be < 939
>> 939
>>
>>
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list