I am trying to use the verb `intersection` shown below as found
https://code.jsoftware.com/wiki/Vocabulary/minusdot .
But I get the following peculiar result on AOC#6 when applying it with
intersection for the following data. Am I applying these primitives
incorrectly?
intersection
[ -. -.
#
Hello,
I believe the culprit is spaces getting padded in unboxing. It should
work if you do something like
# > intersection &.> words
Joseph
On 12/17/20, Brian Schott wrote:
> I am trying to use the verb `intersection` shown below as found
> https://code.jsoftware.com/wiki/Vocabulary/minusdot
by using &> instead of &.> you end up comparing scalar vs list when starting
from the right.
([ -. -.)&.>/(<'rcyshqp'),(<'jbdnpe'),(<'zgp'),<'pnjtz'
┌─┐
│p│
└─┘
On Thursday, December 17, 2020, 05:57:13 p.m. EST, Brian Schott
wrote:
I am trying to use the verb `intersection` show
Correction forgot insert: '# > intersection &.>/ words' and though my
fix is correct I now see the reasoning was faulty (thanks to Pascal)
On 12/17/20, Joseph Novakovich wrote:
> Hello,
>
> I believe the culprit is spaces getting padded in unboxing. It should
> work if you do something like
>
> #
Pascal and Joseph,
Thanks, changing every to each was just the fix I needed.
--
(B=)
--
For information about J forums see http://www.jsoftware.com/forums.htm
Dear all,
I need to represent the 2D rotation matrix 'R'
R = |cos(t) -sin(t)|
|sin(t) cos(t)|
and compute it for different values of the rotation angle 't'. I am aware
the matrix of function can be represented as a gerund, which I like:
R =: 2 2$cos`(-@sin)`sin`cos .
To compute R(t),