【发布时间】:2011-10-05 09:35:52
【问题描述】:
替换列表的特定子序列的最佳方法是什么?
假设我想用i 替换子序列(m e):
(sub-substitute 'i '(m e) '(y o u a n d m e))
⇒ (Y O U A N D I)
注意事项:这与函数substitute非常相似:
(substitute 'u 'i '(i are hungry))
⇒ (U ARE HUNGRY)
【问题讨论】:
标签: list lisp common-lisp replace