Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表格列表:
(or a b c (and d e) f g (and h i) (==> x y))
我喜欢像这样移动以以下开头的子and列表or:
and
or
(or (and d e) (and h i) a b c f g (==> x y))
我怎样才能做到这一点?我不确定什么是最好的方法,因为它是一个列表,我不能像使用其他数据结构一样放置任何我想要的元素。
? (stable-sort (rest '(or a b c (and d e) f g (and h i) (==> x y))) (lambda (x y) (and (consp x) (eq (first x) 'and)))) ((AND H I) (AND D E) A B C F G (==> X Y))