If we want to be silly, here's an implementation which matches the
original spec, but (a) does some unnecessary work, and (b) computes a
result which might not have been desired.

hft=: <.@^@=@?~@# %~ |: + +

Or, even sillier (and efficient!):

hft=: $ $ 1:

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to