Hey, Is there an easy way to sort an array with verb returning either 0 or 1, like the comparison primitives?
The verb that I'd in mind relates to the 2023's advent of code's day 7: given two equal length hands, which one has the first high card. Which one can write as: 'K2345' ( 2 | 0 { [: I. [: , [: (<,.>)/ ,: & ('23456789TJQKA'i.]) ) 'KJ2KA' 0 NB. here meaning left is not greater right Cheers, ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm