[Jprogramming] Am I understanding m/y ?

Michal Wallace michal.wallace at gmail.com
Wed Feb 24 16:14:43 UTC 2016


er... that works better when you define 'i'  :)

i=: 1 : ('m,y'; ':'; 'x,m,y')

On Wed, Feb 24, 2016 at 10:13 AM, Michal Wallace <michal.wallace at gmail.com>
wrote:

> rscan:
>
>
>    rscan =: 1 : '((>:-(#m)|#y)|.m)/y'
>    ('!'i)`('?'i)`('|'i) rscan \ 'abcdefghijk'
> a
> a|b
> a?b|c
> a!b?c|d
> a|b!c?d|e
> a?b|c!d?e|f
> a!b?c|d!e?f|g
> a|b!c?d|e!f?g|h
> a?b|c!d?e|f!g?h|i
> a!b?c|d!e?f|g!h?i|j
> a|b!c?d|e!f?g|h!i?j|k
>
>
> r is for raul or reverse.. take your pick :)
>
> On Wed, Feb 24, 2016 at 8:57 AM, Alex Shroyer <ashroyer at gmail.com> wrote:
>
>> For Skip's example, a completely literal version:
>>
>> ((*`+)/)`((+`*)/)\. >:i.7
>>
>> On Wed, Feb 24, 2016 at 9:25 AM, Brian Schott <schott.brian at gmail.com>
>> wrote:
>>
>> > Pascal,
>> >
>> > I think your <: is too limiting. But I love your approach.
>> >
>> > fn =: <@|.@[ (|.each@:|.@:($~ each 1 >.   <:)  4 : 'x/ y' every
>> <\.@]) ]
>> > fn =: <@|.@[ (|.each@:|.@:($~ each 1 >. i.@#)  4 : 'x/ y' every
>> <\.@]) ]
>> >
>> > On Tue, Feb 23, 2016 at 10:51 PM, Pascal Jasmin <godspiral2000 at yahoo.ca
>> >
>> > wrote:
>> >
>> > > fn =: <@|.@[ (|.each@:|.@:($~ each 1 >. <:)  4 : 'x/ y' every
>> <\.@]) ]
>> > >
>> > >
>> > >  %`- fn 1 2 3 4 5 6 7
>> > > 0.6 1.66667 0.333333 9 _5 _1 7
>> > >
>> > >
>> > >  *`+ fn 1 2 3 4 5 6 7
>> > > 209 209 207 69 65 13 7
>> > >
>> > >
>> > >
>> > >
>> > ----------------------------------------------------------------------
>> > 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