Yes, I was surprised that the expression   (^~ 3 4 3 5)  is a hook, because it 
contains only one verb    (^~) .

      ^~ 3 4 3 5 
27 256 27 3125
       3 4 3 5  ^~ 3 4 3 5 
27 256 27 3125
       3 4 3 5  ^ 3 4 3 5 

27 256 27 3125



--- Den søn 22/11/09 skrev Tracy Harms <kalei...@gmail.com>:

Fra: Tracy Harms <kalei...@gmail.com>
Emne: Re: [Jprogramming] On a curious property of 3435
Til: "Programming forum" <programming@jsoftware.com>
Dato: søndag 22. november 2009 01.12

Ric,

I phrased the tacit definition with an awareness that most of my
readers do not know J, and with the hope of keeping as much emphasis
as possible on the summation and reflexive exponentiation that
dominate this interesting pattern.

JMQ introduced me to the use of lower-case o as synonym for @: and I'm
liking it a good deal. Like you, Ric, I still find @: easier to parse,
but the aesthetics of the 'o' seem worth the layer of indirection for
many occasions.

Given (3435 = +/ ^~ 3 4 3 5) as context, are the meanings of 'o' and
'digits' clear by implication, even if they aren't spelled out, for a
fluent J programmer looking at (isMunchausen =: = +/ o ^~ o digits)?
I'd say the answer is yes, but as the author I may have expected too
much when I presented that sentence without its subordinate
definitions.

Thanks for noting that, given the full definitions, you found it
straightforward and clear.

--
Tracy

On Sat, Nov 21, 2009 at 3:46 PM, Sherlock, Ric
<r.g.sherl...@massey.ac.nz> wrote:
>> From: Tracy Harms
>>
>> ...
>
> This seems pretty straight forward and clear to me.
> Perhaps the thing that I find hardest in the tacit version is the use of "o" 
> to represent "@:" (requires an extra level of mental substitution).  I think 
> most reasonably fluent J readers would find the following easier to 
> parse/understand:
>     isMunchausen =: = +/@:^~@:digits
>
> ... which is more obviously a 2-verb train (hook)
>
> However I imagine someone not familiar with J would find that more 
> intimidating.
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



      Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på 
LCD TV! Se her http://dk.yahoo.com/r/pat/lcd
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to