I think I'll just explain it as each element on the left being applied
to the corresponding element on the right. When the shapes are unequal
but compatible, then it will be filled.

Brian - thanks for the reminder about trace.

Devon - thank you also for the suggestion. Taking out splitstring and
using a simpler verb it makes sense to me. No real mystery now. Sorry
for the basic question and filling inboxes with newbieness.

 'a' , each 'yz' NB. fills in a on the left
┌──┬──┐
│ay│az│
└──┴──┘

'ab' , each 'y' NB. fills in y on the right
┌──┬──┐
│ay│by│
└──┴──┘

'ab' , each 'yz' NB. no fill needed
┌──┬──┐
│ay│bz│
└──┴──┘

'abc' , each 'yz' NB. no fill possible/incompatible shapes
|length error
|   'abc'    ,each'yz'

'ab'    ,each'xyz' NB. no fill possible/incompatible shapes
|length error
|   'ab'    ,each'xyz'


Numbers make it really clear what's going on:

1 + each (1;2) NB. fill left
┌─┬─┐
│2│3│
└─┴─┘
1 2 + each (1;2) NB. no fill needed
┌─┬─┐
│2│4│
└─┴─┘
 1 2 3 + each (1;2) NB. incompatible shapes
|length error
|   1 2 3    +each(1;2)

1 2 + each (1;2;3) NB. incompatible shapes
|length error
|   1 2    +each(1;2;3)


'=:' is the same thing as 1 2 being applied to a list on the right

<'=:' is shape 1 presumably [even though  $ (<'=:') outputs nothing]
so it gets filled on the right.


On Fri, Jan 17, 2014 at 5:23 PM, Devon McCormick <devon...@gmail.com> wrote:
> Joe wonders:
>> I also don't really understand why this doesn't work   '=:'
>> splitstring each ('a=:b';'c=:dz') but I have some hunches
>
> Try
> '=:' splitstring each ('a=:b';'c=:d';'e=:f')    NB. 2 let args, 3 on right
> for a hint.
>
>
> On Fri, Jan 17, 2014 at 3:22 PM, Joe Bogner <joebog...@gmail.com> wrote:
>
>> On Fri, Jan 17, 2014 at 10:47 AM, R.E. Boss <r.e.b...@planet.nl> wrote:
>> >
>> >      (<'=:') splitstring each ('a=:b';'c=:dz')
>>
>> >      '=:' splitstring L:0 ('a=:b';'c=:dz')
>>
>> Thanks R.E.
>>
>> I also had these
>>
>> '=:'&splitstring each ('a=:b';'c=:dz')
>>
>> '=:' splitstring "1 > ('a=:b';'c=:dz')
>>
>> I have no idea what is more idiomatic or if if it matters. I just
>> don't want to duct tape together something that others look at and
>> wonder what I was thinking.
>>
>> I also don't really understand why this doesn't work   '=:'
>> splitstring each ('a=:b';'c=:dz') but I have some hunches
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
>
> --
> Devon McCormick, CFA
> ----------------------------------------------------------------------
> 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