How about both?
h=: 13 :'i.>:|-/y'
1 _1(*"0 1)3 _7+/ h 3 7
3 4 5 6 7
7 6 5 4 3
Linda
Sent from AOL Mobile Mail
On Friday, April 6, 2018 Devon McCormick wrote:
Hi - I'm working with selecting sequential items from a vector given a starting
and an ending point as a pair of integers.
Hi,
Not a general answer about gerunds or tacit conditionals, but a particular
solution for seq:
seq=: [ + (* * i.@>:@|)@-~
3 seq 7
3 4 5 6 7
3 seq~ 7
7 6 5 4 3
Cheers,
Louis
> On 6 Apr 2018, at 22:23, Devon McCormick wrote:
>
> Hi -
>
> I'm working with selecting sequential items
Lightly tested and non-optimized and ugly, but seems to work!
genseq=:({: + i.@:>:@:-/)@]
seq =: (] (>/@[ \:~@]^:[ genseq) \:~) f.
] (>/@[ \:~@]^:[ ({: + i.@:>:@:-/)@]) \:~
seq 3 7 3 4 5 6 7 seq 7 3 7 6 5 4 3
On Fri, Apr 6, 2018 at 3:23 PM, Devon McCormick wrote:
> Hi -
>
> I'm working
Look into ];.0
Henry Rich
On 4/6/2018 3:23 PM, Devon McCormick wrote:
Hi -
I'm working with selecting sequential items from a vector given a starting
and an ending point as a pair of integers. If we assume we always get the
pair as (lesser, greater), something like this suffices:
seq=: {
Hi -
I'm working with selecting sequential items from a vector given a starting
and an ending point as a pair of integers. If we assume we always get the
pair as (lesser, greater), something like this suffices:
seq=: {. + [: i. [: >: -~/
seq 3 7
3 4 5 6 7
However, if our assumption about