But wouldn't it be nice to be able to have !. (fit) work with user
defined verbs? I can't figure out how to do it but we are supposed to be
able to replace a primitive with a name which is defined to be the
primitive just about anywhere. The excepton seems to be with !. .
a=: 1 1 0 1 0 1
b=: 1 2 3 4
a expand f.!._1 b
1 2 _1 3 _1 4
a expand !._1 b
|domain error
| a expand!._1 b
Miller, Raul D wrote:
Randy A MacDonald wrote:
If only we could change the fill element with a hook into
!.(Custom)...
a expand!._1 b
1 2 _1 3 _1 4
Using the definition of expand which comes with J:
a=: 1 1 0 1 0 1
b=: 1 2 3 4
a expand f.!._1 b
1 2 _1 3 _1 4
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm