Oops, I forgot the key part of the code.
pos=: {.@[
dep=: 1&{@[
am=: {:@[
down=: pos,dep,am+]
up=: pos,dep,am-]
forward =: [:|.am,(dep+am*]),pos+]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
