mijj <[email protected]> wrote:
> after some checking ...
>
> even better...
> using J's "apply" (128!:2)
>    (*:`+:`-:) (128!:2)&> (2 3 4)
> NB. 4 6 2
>
> as a J version of:
>    (`a`b`c)!(1 2 3)

The fact that this happens to work is more by accident than by design.
` creates gerunds, while 128!:2 requires strings.
Gerunds just happen to be boxed strings for simple primitives or for
names, but this is not true for verbs in general.

   (+/`+:`-:) (128!:2)&> (2 3 4)
|domain error
|   (+/`+:`-:)    (128!:2)&>(2 3 4)

Of course, if you know that all the verbs are primitives or names,
this should work fine.

-- Mark D. Niemiec <[email protected]>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to