List Commands Library for 50g
|
04-02-2018, 12:12 PM
Post: #322
|
|||
|
|||
RE: List Commands Library for 50g
(04-02-2018 08:51 AM)pier4r Wrote: Finding the min and maximum of a list. LMAX and LMIN. It would suprise me if no one asked for this before. In the past I've used the following: « MAX » STREAM « MIN » STREAM ...to find the max and min values of a list. It's both small and efficient. A list of 500 reals can be completed in about 0.75s with either of these. Creating specialized functions for these would take up room with little (if any) performance gain, so I guess I've never been inclined to consider something like that for the library. STREAM is a built-in list processing command that doesn't get quite as much attention as its cousins, but it's actually a good performer. It was the first command that I recall looking at (with Nosy) that used the technique of pushing a list onto the RPL return stack in order to step through its contents one element at a time. Used in the proper context, this is a very effective way to traverse a list's contents in SysRPL programs. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)