Hi Devon,
I think the problem is with the verbs that you are creating.
[ train=:([:-)`([:%)`([:*:)`([:%:) @. (0;<1;<2 3)
[ (([: -) (([: %) (([: *:) ([: %:)))) NB. all of the verbs are hooks ([:
v) which would give domain errors
train 4
|domain error: train
| train 4
[ train1=:(-)`(%)`(*:)`(%:) @. (0;<1;<2 3) NB. remove the [: in each hook
[ (- (% (*: %:))) NB. looks better but (*: %:) is a hook which requires *: to
be dyadic - and there is no dyadic form of this verb
train1 4
|domain error: train1
| train1 4
[ train2=:(-)`(%)`(+)`(%:) @. (0;<1;<2 3) NB. replace *: with + which can
be dyadic
[ (- (% (+ %:)))
train2 4
3.33333
and I see that Henry has already replied from a different perspective and his
answer may satisfy your question better than mine.
Cheers, bob
> On Jul 11, 2018, at 8:28 PM, Devon McCormick <[email protected]> wrote:
>
> ([:-)`([:%)`([:*:)`([:%:) @. (0;<1;<2 3)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm