I am using clisp and I wonder if there is any library with a setfable version of nthcdr that I can use.
相关问题
- Generating powerset in one function, no explicit r
- Drakma and Dexador both fails at USocket call whil
- Forming Lisp code to task — related to flatten lis
- clisp 2.49: asdf cannot find asd
- unfold function in scheme
相关文章
- Does learning one Lisp help in learning the other?
- Common Lisp: Why does my tail-recursive function c
- What is the definition of “natural recursion”?
- How do I write a macro-defining macro in common li
- How can I unintern a qualified method?
- Changing the nth element of a list
- Is a “transparent” macrolet possible?
- sleep in emacs lisp
You can hack around it with:
Or define your own setf for it:
I do not know why nthcdr does not have a setf defined. Even Alexandria seems to define setf for last, but not nthcdr.
PS. I would treat wanting to setf an nthcdr as a bad smell in your code.
Doesn't work when n is 0 though, you could make it work when LIST is a symbol, checking if N is zero either on macroexpansion time, but then it only works if N is a number, or including the check in the expanded code.