[Jprogramming] &.-

David Lambert b49p23tivg at stny.rr.com
Thu Sep 26 03:08:42 UTC 2013


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



More information about the Programming mailing list