Although g and h both produce y correctly, h can't be used with b.
and ^:_1
g=: 2+3**:
]y=: g 5
77
h=: 13 : '2 0 3 p. y'
]y=:h 5
77
g b. 0
_ _ _
g b. _1
[: %: 0.33333333333333331 * _2 + ]
g ^:_1 y
5
h b. 0
_ _ _
h b. _1
|domain error
| h b._1
h ^:_1 y
|domain error
| h^:_1 y
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Monday, February 11, 2013 9:26 AM
To: [email protected]
Subject: Re: [Jprogramming] Basic Mystery
This looks interesting! Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Monday, February 11, 2013 9:04 AM
To: [email protected]
Subject: Re: [Jprogramming] Basic Mystery
g=: 2 0 3 p. ]
--
Raul
On Mon, Feb 11, 2013 at 4:45 AM, Linda Alvord <[email protected]>
wrote:
> Morning Wakeup Exercise:
>
> g=: +&2@(*&3@*:)
> ]y=: g 5
> 77
>
> Try to write this in simple J. (example from vocabulary for Basic)
----------------------------------------------------------------------
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