This works well and is a lot less complicated than mine! I still need to study it. With the example below I wanted to suggest that the domain omit negative numbers. It would be nice if the domain also omitted non-integers.
br _13 |domain error: br | br _13 Kip On 12/27/2011 10:16 AM, Raul Miller wrote: > Best I can come up with at the moment is > (([:<.2^.1>.>./@,) (<.@%&2@{.,2&|)@]^:["1 ,"0) > > Note that this version does not handle negative numbers. > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm