No, u&v works differently:
a silly example:
- 4
_4
- 5
_5
NB. these all do the same:
_4 + _5
_9
(- 4) + (- 5)
_9
4 +&- 5
_9
So dyadic x u&v y applies v monadicly to both x and y,
u then applies dyadicly to (v x) and (v y)
x u&v y ←→ (v x) u (v y)
eg pythagoras
%: 3 +&*: 4
5
Am 17.01.22 um 05:53 schrieb P Padilcdx:
What I don’t quite understand was the expansion of
-.&;:&’-‘ y
to
y (-.&;:) ‘-‘
and then
(;: y) -. (;: ‘-‘)
So I was thinking the -.&;: is a hook.
Complete newbie, so apologies.
On Jan 16, 2022, at 8:46 PM, Hauke Rehr <[email protected]> wrote:
I don’t quite understand.
LHS is just the result of applying ;: to the value 'start-A'.
Am 17.01.22 um 05:45 schrieb P Padilcdx:
That helps. What rule applies for making the LHS? Is it a hook?
Thank You!!
On Jan 16, 2022, at 8:09 PM, Hauke Rehr <[email protected]> wrote:
Maybe I should elaborate on this a bit more:
] LHS =: ;: 'start-A'
┌─────┬─┬─┐
│start│-│A│
└─────┴─┴─┘
] RHS =: ;: '-'
┌─┐
│-│
└─┘
LHS -. RHS
┌─────┬─┐
│start│A│
└─────┴─┘
(;: 'start-A') -. (;: '-')
┌─────┬─┐
│start│A│
└─────┴─┘
Or was the missing link for you somewhere else?
Am 17.01.22 um 04:56 schrieb Hauke Rehr:
First, you apply ;._2
Then it’s just a row-wise -.&;:
eg
'start-A' (-.&;:) '-'
┌─────┬─┐
│start│A│
└─────┴─┘
Am 17.01.22 um 04:01 schrieb P Padilcdx:
Slowly following the discussion. I confess I’m stuck at how the composition of
-.&;:&’-‘ work in the unpack verb. Try to read the description of & in NuVoc
and LJ, but i confess to still be clueless as to how J parses it. I experimented a bit but
still perplexed. Can someone point me in the right direction? Much appreciated.
Thanks
Pete
On Jan 2, 2022, at 11:52 AM, Raul Miller <[email protected]> wrote:
unpack=:-.&;:&'-';._2
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm