[英]scheme list equivalence comparison
Hello I need to check if two lists have same elements in same order but I wasn't able to achieve as it seems like scheme eq?您好,我需要检查两个列表是否具有相同顺序的相同元素,但我无法实现,因为它看起来像方案 eq? and eqv?
和 eqv? checks by reference so giving false to such:
通过引用检查,因此对此类错误:
> (eq? (list 1 2 3) (list 1 2 3))
#f
> (eqv? (list 1 2 3) (list 1 2 3))
#f
How to achieve this ?如何实现这一目标?
seems like equal?好像平等? and eq?
和等式? are seperate procedures where equal checks as I needed:
是单独的程序,根据我的需要进行同等检查:
> (equal? (list 1 2 3) (list 1 2 3))
#t
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.