Groups
Groups
Sign in
Groups
Groups
Lisp中国用户组
Conversations
About
Send feedback
Help
remove 函数
2 views
Skip to first unread message
panfei
unread,
Oct 12, 2012, 11:14:26 PM
10/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lisp-...@googlegroups.com
[55]> (setf lst '(c a r a t))
(C A R A T)
[56]> (remove 'a lst)
(C R T)
[57]> lst
(C A R A T)
[58]>
总结:为什么不说remove从一个列表中删除一个对象呢?因为它并不是那么做的。原来的列表在函数调用之后还是原来的样子。如果我们确实想要从列表中删除元素:
[58]> (setf lst (remove 'a lst))
(C R T)
[59]> lst
(C R T)
[60]>
--
不学习,不知道
Reply all
Reply to author
Forward
0 new messages