For part 1, I implemented something like that explicitly.

For part 2, I went with an argument of pos,skip,list (which might be
more amenable to a tacit representation of part 1). But my gut feeling
is that this one is messy enough that it's more comprehensible to
stick with an explicit representation.

Using t like you are doing here prevents it from being an argument
(which you'll want, I imagine, for your code to work on both the AoC
test cases and the "real value" they supply).

That said, if I went full tacit, I'd either be using the gerund form
for } - or I'd work out how to do it without } in the mix.

Not sure this helps... but you didn't really ask a specific question,
so maybe this will be close enough.

Thanks,

-- 
Raul




On Sun, Dec 10, 2017 at 2:02 PM, Jimmy Gauvin <[email protected]> wrote:
> Hi,
>
> would anyone care to comment on the transformation of this piece of code to
> tacit notation?
>
> v being the 256 element vector
> c being the current position
> t being the length of the part tot rotate
>
> NB. v=.c|.v
> NB. v=.(|.t{.v),t}.v
> NB. v=.(-c)|.v
>
> v=.( |.&(t&{.) , t&}. ) &. (c&|.) v
>
> Thanks
> ----------------------------------------------------------------------
> 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