Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-27 Thread Raul Miller
for all of us. > > Linda > > > > -Original Message----- > From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf > Of 'Jon Hough' via Programming > Sent: Tuesday, January 24, 2017 11:29 PM > To: programm...@jsoftware.com > Subject:

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-26 Thread Linda A Alvord
Linda A Alvord Sent: Wednesday, January 25, 2017 9:31 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Return of max of list and it's index in single pass Jon, I haven't been using J for a while so I tried your problem. In a way I must think like a beginner again. Here'

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Henry Rich
Linda -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of R.E. Boss Sent: Wednesday, January 25, 2017 10:51 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Return of max of list and it's index in single pass ((],{~) {.@\:)

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Linda A Alvord
of list and it's index in single pass ((],{~) {.@\:) R.E. Boss -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: woensdag 25 januari 2017 11:15 To: programm...@jsoftware.com Subject: Re: [Jprogramming] Return of max

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Jose Mario Quintana
; >>f A > >> 3 > >> > >>f > >> (] = >./) # [: i. $ > >> > >> > >> So this is "beginner Tacsit" that seems to work. Then it is fun to see > >> what I can learn from the masters who have already solved y

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Raul Miller
t;> >> >> So this is "beginner Tacsit" that seems to work. Then it is fun to see >> what I can learn from the masters who have already solved your problem. >> Keep sending your questions. They are goo for all of us.

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Jose Mario Quintana
that seems to work. Then it is fun to see > what I can learn from the masters who have already solved your problem. > Keep sending your questions. They are goo for all of us. > > Linda > > > > -Original Message----- > From: Programming [mailto:programming-boun...@forums.jso

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread R.E. Boss
((],{~) {.@\:) R.E. Boss -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: woensdag 25 januari 2017 11:15 To: programm...@jsoftware.com Subject: Re: [Jprogramming] Return of max of list and it's index in single pas

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Linda A Alvord
Re: [Jprogramming] Return of max of list and it's index in single pass Yep, that's what I was looking for. Thanks! ---- On Wed, 1/25/17, Raul Miller wrote: Subject: Re: [Jprogramming] Return of max of list and it's index in single pa

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-25 Thread Henry Rich
hanks again, Jon On Wed, 1/25/17, Henry Rich wrote: Subject: Re: [Jprogramming] Return of max of list and it's index in single pass To: programm...@jsoftware.com Date: Wednesday, January 25, 2017, 12:02 PM (i. >./) From

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-24 Thread 'Jon Hough' via Programming
Yep, that's what I was looking for. Thanks! On Wed, 1/25/17, Raul Miller wrote: Subject: Re: [Jprogramming] Return of max of list and it's index in single pass To: "Programming forum" Date: Wednesday, Januar

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-24 Thread 'Jon Hough' via Programming
ing] Return of max of list and it's index in single pass To: programm...@jsoftware.com Date: Wednesday, January 25, 2017, 12:02 PM (i. >./) From section 1.6.6 of http://code.jsoftware.com/wiki/Vocabulary/SpecialCombinations Henry Rich On 1/24/2017 9:58 PM, 'Jon Hough&#

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-24 Thread Raul Miller
maxIndexAndValue=: ((i.,]) >./) I hope this helps, -- Raul On Tue, Jan 24, 2017 at 9:58 PM, 'Jon Hough' via Programming wrote: > I want to get the max value of a list, and return the first index of its > occurrence in the list, tacitly. > > My solution > > maxWithIndex =: {.@:I.@:(= >./)

Re: [Jprogramming] Return of max of list and it's index in single pass

2017-01-24 Thread Henry Rich
(i. >./) From section 1.6.6 of http://code.jsoftware.com/wiki/Vocabulary/SpecialCombinations Henry Rich On 1/24/2017 9:58 PM, 'Jon Hough' via Programming wrote: I want to get the max value of a list, and return the first index of its occurrence in the list, tacitly. My solution maxWithI

[Jprogramming] Return of max of list and it's index in single pass

2017-01-24 Thread 'Jon Hough' via Programming
I want to get the max value of a list, and return the first index of its occurrence in the list, tacitly. My solution maxWithIndex =: {.@:I.@:(= >./), >./ works ok, but calculates >./ twice. Is there a tacit way to do this with only a single calc of >./ ? Thanks, Jon