I defined a simple "lettermap" verb three (very slightly) different ways:
 
   lm0=:(|:@,:@~.);=
   lm1=:(|:@:,:@:~.);=
   lm2=:([:([:|:,:)~.);=
   lm2 'Mississippi'
┌─┬─────────────────────┐
│M│1 0 0 0 0 0 0 0 0 0 0│
│i│0 1 0 0 1 0 0 1 0 0 1│
│s│0 0 1 1 0 1 1 0 0 0 0│
│p│0 0 0 0 0 0 0 0 1 1 0│
└─┴─────────────────────┘
   
What is unclear to me is how to think of rank when using cap. There is an 
internal rank difference between lm0 and lm1, which appears to be of no 
consequence here. I don't know whether lm2 corresponds exactly to lm0, lm1, or 
neither. Most importantly, I'm not sure how to approach thinking through the 
differences. (Although, I suspect that the place to start would be with a verb 
where the difference between @ and @: is material.)
 
Advice will be appreciated.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to