[Jprogramming] dyadic valence of v in u&.v ?
'Pascal Jasmin' via Programming
programming at jsoftware.com
Mon Jan 2 01:10:34 UTC 2017
not what was asked but there is also
0 0 1 0 0 1 (* >:) i.6
----- Original Message -----
From: Henry Rich <henryhrich at gmail.com>
To: programming at jsoftware.com
Sent: Sunday, January 1, 2017 4:51 PM
Subject: Re: [Jprogramming] dyadic valence of v in u&.v ?
You can't save it using &. . But nothing stops you from writing your
own conjunction.
semidual =: 2 : 0
:
u&.(x&v) y
)
Henry Rich
On 1/1/2017 3:40 PM, David Koppenhoefer wrote:
> Reading the wonderful NuVoc I found the gem that dyadic # has an inverse
> - it can therefore be used in &. like
>
> >: &. (0 0 1 0 0 1&#) i.6
> 0 0 3 0 0 6
>
> , executing a function only on selected items of an array while keeping
> the shape.
>
> The bit array is a noun, but I want to compute it on the fly (from the
> right argument). If the v in u&.v had dyadic valence, something like
>
> 0 0 1 0 0 1 >:@] &. # i.6
>
> would be possible and the left argument could be replaced by a
> computation. Here I'm stuck. From what I understood so far this seems to
> be impossible - the v in the &-conjunctions is always monadic. Is
> there a way to save the idea?
>
>
> P.S.: needed in AoC day 24...
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list