Jump to content

Recommended Posts

Posted (edited)

hi

 

how would you shift items of a list?

 

_$ (setq lst '((0)(1)(2)(3)(4)(5)(6)(7)))

 

((0)(1)(2)(3)(4)(5)(6)(7)))

((1)(2)(3)(4)(5)(6)(7)(0)))

((2)(3)(4)(5)(6)(7)(0)(1)))

((3)(4)(5)(6)(7)(0)(1)(2)))

Edited by samifox
Posted

for example :

 

 

(setq lst '((0) (1) (2) (3) (4) (5) (6)))

 

 

(append (cdr lst) (list (car lst))) -> ((1) (2) (3) (4) (5) (6) (0))

 

 

 

(tried to change company browser settings to see if the wrap code works now moderator)

 

 

gr. Rlx

Posted
excellent lib! thanks for sharing

 

Be aware that the library is Common LISP, not AutoLISP.

Posted
Be aware that the library is Common LISP, not AutoLISP.

 

hi Lee

 

where we can find some of your codes regarding to list manipulation?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...