Programming puzzles: processing lists!
|
06-12-2017, 07:24 PM
Post: #140
|
|||
|
|||
RE: Programming puzzles: processing lists!
(06-12-2017 04:48 PM)pier4r Wrote: I have the userRPL (that explodes the list, yours are very compressed in terms of code. Neat) of those commands, I wondered if making a sysRPL version would have been (way) faster. Well in this case barely faster. The UserRPL commands aren't much different from the SysRPL ones in this particular case. But I have no problem adding this, so I went ahead and created a new command "LHDTL" -- here's the detailed description: Code: ______________________________________________________________________________ I don't much like commands that leave varying levels of results, so I chose to return NOVAL for an empty list's first object instead of returning just an empty list. Hopefully that's an acceptable approach. Also, it isn't a stretch to see that "REVLIST LHDTL" will get the last element, and I figured that if you are processing a list from the end you'd probably want to keep it reversed anyway. So I didn't see as much value in adding a separate command to get the last element. (06-12-2017 04:48 PM)pier4r Wrote: Sure, it is all for iterations instead of using DOLIST I've added this to my list of "future considerations". I need to think about this one some more. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)