Here’s the problem f=: 13 :' (B=:;:''am pm''),~&.>/A=:<"1 ":":"0>:i.y' f 12 ┌────┬────┬────┬────┬────┬────┬────┬── ──┬────┬────┬────┬────┐ │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│ ├────┼────┼────┼────┼────┼────┼────┼── ──┼────┼────┼────┼────┤ │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│ └────┴────┴────┴────┴────┴────┴────┴── ──┴────┴────┴────┴────┘ A ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │1 │2 │3 │4 │5 │6 │7 │8 │9 │10│11│12│ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘ B ┌──┬──┐ │am│pm│ └──┴──┘ g=: 13 :'x(,~&.>)/y' B g A ┌────┬────┬────┬────┬────┬────┬────┬── ──┬────┬────┬────┬────┐ │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│ ├────┼────┼────┼────┼────┼────┼────┼── ──┼────┼────┼────┼────┤ │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│ └────┴────┴────┴────┴────┴────┴────┴── ──┴────┴────┴────┴────┘ g ,~&.>/ NB. x u&.v y ↔ vi (v x) u (v y) Definition of Under
I can’t seem to write a simple definition h=: It should have the same result as B g A when you enter B h A Linda ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm