Post Reply 
newRPL - Updated to build 1497 [official build remains at 1487]
10-06-2021, 12:32 AM (This post was last modified: 10-06-2021 12:38 AM by Claudio L..)
Post: #193
RE: newRPL - Updated to build 1497 [official build remains at 1487]
(10-04-2021 09:17 PM)JoJo1973 Wrote:  
Code:

{ 1 2 { 3 4 { 5 } } « →STR » MAPLIST→
returns
Code:

"1"
"2"
{ "3" "4" { "5" } }
instead of
Code:

"1"
"2"
"3"
"4"
"5"

It seems to me that since the program is mapped to all elements thru full depth then all the sublists should be exploded, but maybe that's a design choice and not a bug.

Claudio could you clarify?

MAPLIST→ is simply a shortcut for « MAP LIST→ DROP », in other words, it does MAP but doesn't recreate the list, simply leaves the items on the stack. This saves time when you don't actually need the list created. Creating the list has a cost in time and memory, as all objects must be copied within the new list object.
I can't recall where exactly I needed this (maybe a solver, or symbolics rule processing, menus, etc.) so I created this command to improve performance.

EDIT: I wanted to clarify that going into the sub-lists individual elements while still retaining the structure is a feature of MAP, coming directly from the 50g AUR. LIST→ on the other hand, does not recurse.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - Updated to build 1497 [official build remains at 1487] - Claudio L. - 10-06-2021 12:32 AM



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