On Fri, Oct 31, 2014 at 9:22 AM, Devon McCormick <[email protected]> wrote:
> Matrix multiply is a good place to start as the dot conjunction simply > generalizes the operations behind it. > > NB. The dot (.) conjunction is so general that it can make an unexpected apparition. NB. Consider the question in the message: NB. NB. http://www.jsoftware.com/pipermail/programming/2008-January/009553.html NB. NB. " NB. Given a sequence of verbs, say u0, u1, u2, ... and a row of integers, say NB. i0, i1, i2, .... NB. How does one achieve NB. NB. ... u2^:i2 u1^:i1 u0^:i0 y ? NB. " NB. NB. For example, 1&+^:2 ((+ %:@|)^:3) ((% ^)^:4) 5 3.46995 NB. Which can be rewritten as, 1&+^:2@:((+ %:@|)^:3)@:((% ^)^:4) 5 3.46995 NB. The pattern (u3^:I3) @: (u2 ^: I2) @: (u1 ^: I1) @: (u0 ^: I0) smells as NB. at/ .power and sulfur... o=. @: x=. o[ e=. &.> Cloak=. ((5!:1)@:<'Cloak')Cloak=. (0:`)(,^:) 'at power evoke'=. Cloak o < e o ;: '@: ^: `:' box=. < o evoke&6"0 ( pv=. (box x (at&>~ / .(power e)) ])f. ) <@:(,^:(0:``:))&6"0@:[ ,^:(0:`@:)&>~/ .(,^:(0:`^:)&.>) ] (% ^)`(+%:@|)`(1&+) pv 4 3 2 (5) 3.46995 u0`u1`u2`u3 pv 0 1 2 3 u3^:3@:(u2^:2)@:(u1^:1)@:(u0^:0) NB. HAPPY HALLOWEEN!!! ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
