True - in the general case, p. will be difficult to invert and
apparently no exception has been implemented for the simple, constant
cases.

On the other hand, you can use the left argument given to p. with p..
and you can also use an array of them with rank and you can manipulate
them in other ways (providing something analogous to gerunds but
simpler than them).

Anyways, I usually ignore non-requirements when building code -
attempting to implement non-requirements often makes the code complex
and can get in the way of later requirements.

-- 
Raul

On Tue, Feb 12, 2013 at 4:56 AM, Linda Alvord <[email protected]> wrote:
>  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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to