Thanks Raul and Kip, Here is how I should have written the four verbs:
NB. m&v y is defined as m v y
NB. u&n y is defined as y u n
f=: 13 :'4&* y'
g=: 13 :'4*& y'
h=: 13 :'&*4 y'
i=: 13 :'*&4 y'
f
4&*
g
3 : '4*& y'
h
3 : '&*4 y'
i
*&4
5!:4 <'f'
-- 4
-- & -+- *
5!:4 <'g'
-- 3
-- : -+- ,:'4*& y'
5!:4 <'h'
-- 3
-- : -+- ,:'&*4 y'
5!:4 <'i'
-- *
-- & -+- 4
f 5
20
g 5
|syntax error: g
| 4*&y
h 5
|syntax error: h
| &*4 y
i 5
20
My remaining question is about the trees for g and h . How did the
,: show up in the trees? What does it mean? Is it a signal that there is
a syntax error?
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of km
Sent: Sunday, March 09, 2014 12:46 AM
To: [email protected]
Subject: Re: [Jprogramming] Oddities in Bond including ,:
A suggestion: where do the understood parentheses go in 4&*y and in 4*&y
? --Kip
Sent from my iPad
> On Mar 8, 2014, at 10:33 PM, "Linda Alvord" <[email protected]>
wrote:
>
> Why is the display of f different than g , h and I ?
>
>
>
> NB. m&v y is defined as m v y
>
>
>
> NB. u&n y is defined as y u n
>
>
>
> f=: 13 :'4&*y'
>
>
>
> g=: 13 :'4*&y'
>
>
>
> h=: 13 :'y&*4'
>
>
>
> i=: 13 :'y*&4'
>
>
>
> f
>
> 4&*
>
>
>
> g
>
> 3 : '4*&y'
>
>
>
> h
>
> 3 : 'y&*4'
>
>
>
> i
>
> 3 : 'y*&4'
>
>
>
> 5!:4 <'f'
>
> -- 4
> -- & -+- *
>
>
>
> 5!:4 <'g'
>
> -- 3
> -- : -+- ,:'4*&y'
>
>
>
> 5!:4 <'h'
>
> -- 3
> -- : -+- ,:'y&*4'
>
>
>
> 5!:4 <'i'
>
> -- 3
> -- : -+- ,:'y*&4'
>
>
>
> Where does ,: come from in the trees for g , h and I ?
>
>
>
>
>
> f 5
>
> 20
>
>
>
> h 5
>
> 20
>
>
>
> g 5
>
> |syntax error: g
> | 4*&y
>
> i 5
>
> |syntax error: i
> | y*&4
>
>
>
> Finally, only two work.
>
>
>
> Linda
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm