List Commands Library for 50g
|
04-04-2018, 04:57 PM
Post: #325
|
|||
|
|||
RE: List Commands Library for 50g
(04-04-2018 03:56 AM)ttw Wrote: << <<MAX>>Stream>> and the corresponding MIN work very well except that they fail with lists of a single element, lists of no elements, non-list variables, and an empty stack. ...which puts those constructs in good company with the rest of the built-in list functions that also get wonky in edge cases. You make good points, though. Perhaps a slightly longer version would still be versatile: Code: DUP 1 GET + « MAX » STREAM That doesn't cover a null list, but I'd be happy with an error in that case anyway. And while there's a bit of risk using "+" here, I believe it should be OK for any object types that MAX is also OK with. As for the argument checking, that applies to any UserRPL code, doesn't it? That said, I'm still pondering the merits of creating specialized functions for LMAX/LMIN processing. I've used MAX in particular for lists on several occasions recently. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)