Post Reply 
RPL mini-challenge: Create an anti-Identity Matrix
05-15-2018, 12:22 PM
Post: #37
RE: RPL mini-challenge: Create an anti-Identity Matrix
(05-15-2018 10:36 AM)pier4r Wrote:  
(05-14-2018 07:12 PM)DavidM Wrote:  Nmdup
Neat! listext? at least hpcalc.org?

ListExt already has a similar list-focused command (LMRPT). It doesn't need the "group size" argument, as that is inherently defined by the list argument itself.

Example:
{ 1 2 3 } 4 LMRPT => { 1 2 3 1 2 3 1 2 3 1 2 3 }

It also accepts a non-list object as the first argument, and in that case simply acts like NDUPN →LIST:

1 4 LMRPT => { 1 1 1 1 }

LMRPT is a relatively good performer. « 30 1 OVER LMRPT SWAP LMRPT » creates a 900-element list in about 0.08s on a 50g.

NMDUP could be useful as a post in the General Software Library, so I'll put something together for that.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL mini-challenge: Create an anti-Identity Matrix - DavidM - 05-15-2018 12:22 PM



User(s) browsing this thread: 1 Guest(s)