Roy A. Crabtree <roy.crabtree <at> gmail.com> writes:

> 
> Mebbe I am missing the pint heah:
> 
> Instead of
> 
> (((A pp 2) pp 3) pp4)...
> 
> what if you stated it as
> 
> 4 pp 3 pp 2 pp A
> 
> as a slightly more friendly way of looking at it?

that's slick - I like it!

> 
> After all, you can always rewrite process_prime that way, or

yes, instead of list process_prime integer
it can be       integer process_prime list

> 
>     ...provide a wrapper
> 
> And that in turn should make the code a bit cleaner:
> 
> i) generate your list (2 3 4 ...)

2 }. (i. 28)

> ii) reverse it (4 3 2)

|.  ( 2 }. (i. 28) )

> iii) scan apply it to A.

scan is beyond me... help needed.

> 
> Now: restate that recursively in lazy evaluative form ...

say what?

> 
> because: ...

> > >    A ( [: > process_prime~&.>/ <"0  <at>  |.  <at>  ] , <  <at>  [) 
> > > 2}.i.28
> 
> after i.28, the rest of it seems like a hole lotta syntax  for what should
> be
> 
> reverse, append, scan/reduce....

amen. it cracks me up when someone knows so much that he/she overlooks the
simple elegant solutions.




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to