Author Topic: Help with sorting lists and using "cons" to add multiple lists.  (Read 858 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 6938
Re: Help with sorting lists and using "cons" to add multiple lists.
« Reply #15 on: January 18, 2019, 12:52:19 PM »
Glad to help :). Really you don't need all the pages if you use the vl-remove-if-not method.  Here's a quick example:
Code - Auto/Visual Lisp: [Select]
  1. (setq i 0)
  2. ;;(setq keep (mapcar 'itoa '(1 4 8 9 12 15)))
  3. (repeat 50 (setq pages (cons (setq i (1+ i)) pages)))
  4. (vl-remove-if-not '(lambda (x) (<= 12 x 25)) (reverse pages))
  5.  

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC