Think of ss below as a list of four sets; elements are in the inner boxes.  
Verb si gives the index of the first set in which an element is found.  Your 
task is to write verb si .

    ]ss =: (<0);(1;2);(3;4;5);< 6;7;8;9
 +---+-----+-------+---------+
 |+-+|+-+-+|+-+-+-+|+-+-+-+-+|
 ||0|||1|2|||3|4|5|||6|7|8|9||
 |+-+|+-+-+|+-+-+-+|+-+-+-+-+|
 +---+-----+-------+---------+
    
    ss si 1;13;8  NB. 1 in set 1, 13 not found, 8 in set 3
 1 4 3

--Kip Murray

Sent from my iPad
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to