[Jprogramming] &.-

Raul Miller rauldmiller at gmail.com
Thu Sep 26 04:59:45 UTC 2013


Note that pt could be simplified:

pt=: (!~  i.@>:)"0 at i.

(there's no need to cross a single argument hook)

FYI,

-- 
Raul

On Wed, Sep 25, 2013 at 11:08 PM, David Lambert <b49p23tivg at stny.rr.com> wrote:
> This may be a wheel reinvented.  It's a fun wheel.
> I've used "under negation" where - has a completely different meaning while
> filling the hole as it did while digging.  On the way in it reverses the
> order of integers, coming out it changes the direction to rotate.
>
>    NB. Pascal's triangle
>
>    (<.@:-:@:i.&.:- |.Rank 0 1 pt)8
> 0 0  0  1  0  0 0 0
> 0 0  0  1  1  0 0 0
> 0 0  1  2  1  0 0 0
> 0 0  1  3  3  1 0 0
> 0 1  4  6  4  1 0 0
> 0 1  5 10 10  5 1 0
> 1 6 15 20 15 6 1 0
> 1 7 21 35 35 21 7 1
>    pt
> (!~  i.@>:)Rank 0~@:i.
>    Rank
> "
>
>
> Fun with j!
>
> http://forums.devshed.com/python-programming-11/help-with-a-program-that-displays-numbers-in-a-pyramid-952131.html#post2904317
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list