Or simplified further:
MAIN    =: 4 : 0
'a b'   =. 0 1 {y
a x~ b
)
   'MINUS' MAIN 3;5
_2
   'PLUS' MAIN 3;5
8

---Sherlock, Ric wrote:
> MAIN    =: 3 : 0
> 'a b'   =. 0 1 {y
> VERB    =. >{:y
> a VERB~ b
> )
>
>    MAIN 4;3;'PLUS'
> 7
>    MAIN 3;5;'MINUS'
> _2
> ---Robert O'Boyle wrote:
> > I've tried all sorts of different combos of boxing, unboxing
> > and so on, to
> > no avail. Here is some script to see what I mean
> >
> > PLUS =: 4 : 0
> > x+y
> > )
> > MINUS =: 4 : 0
> > x-y
> > )
> > MAIN    =: 3 : 0
> > 'a b'   =: >0 1 {y
> > VERB    =:      (>{:y)`:6
> > a VERB b
> > )
> >
> > Then try MAIN 3;4;PLUS`''. I get a domain error:
> >
> > |domain error: MAIN
> > |   VERB=:    (>{:y)`:6
> >
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to