(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

  maxWithIndex =: {.@:I.@:(= >./), >./

works ok, but calculates >./ twice. Is there a tacit way to do this with only a 
single calc of >./ ?

Thanks,
Jon
----------------------------------------------------------------------
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