Post Reply 
Depth of nested list
09-11-2023, 04:05 PM (This post was last modified: 09-11-2023 04:32 PM by Gilles.)
Post: #11
RE: Depth of nested list
A solution in "RPL + ListExt library" or "newRPL + LstX library"

Code:
« 1 → n 
 « WHILE DUP LXIL SWAP OVER SAME NOT REPEAT 1 'n' STO+ END DROP n »
»

The idea is very simple : 'explode' inner list (LXIL) while something changes.

If you dont want to install the library, LXIL is :
Code:
'LXIL' « 1 « IF DUP TYPE 62 == THEN LIST→ DROP END » DOSUBS »
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Depth of nested list - rickster - 09-08-2023, 11:08 PM
RE: Depth of nested list - Joe Horn - 09-09-2023, 12:07 AM
RE: Depth of nested list - John Keith - 09-09-2023, 10:34 AM
RE: Depth of nested list - DavidM - 09-09-2023, 11:33 AM
RE: Depth of nested list - John Keith - 09-09-2023, 03:00 PM
RE: Depth of nested list - DavidM - 09-09-2023, 04:15 PM
RE: Depth of nested list - Albert Chan - 09-09-2023, 11:59 AM
RE: Depth of nested list - John Keith - 09-09-2023, 05:22 PM
RE: Depth of nested list - DavidM - 09-11-2023, 12:55 PM
RE: Depth of nested list - DavidM - 09-11-2023, 03:28 PM
RE: Depth of nested list - Gilles - 09-11-2023 04:05 PM
RE: Depth of nested list - Werner - 09-11-2023, 05:46 PM



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