2012/2/24 Linda Alvord <lindaalv...@verizon.net>: > I used infix and got your rt . But here is what I don't understand. > What is going on in a ? If I remove _ it doesn't work. When it is > there I can't figure out what you've done. > > a=: 13 :'(i.#y)}."0 _ sh y' > a 'abcde' > cbaed > baed > aed > ed > d
#'cbaed' 5 i.#'cbaed' 0 1 2 3 4 0 1 2 3 4 }."0 _ 'cbaed' cbaed baed aed ed d If you are trying to see how rank applies to arguments, it's often handy to replace the verb with something that boxes them -- for example, (;) 0 1 2 3 4 ;"0 _ 'cbaed' ┌─┬─────┐ │0│cbaed│ ├─┼─────┤ │1│cbaed│ ├─┼─────┤ │2│cbaed│ ├─┼─────┤ │3│cbaed│ ├─┼─────┤ │4│cbaed│ └─┴─────┘ So, here, in ("0 _), (0) means "use a single number from the left side", and (_) means "use the entire right argument" when constructing arguments to (}.) -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm