Quantcast
Channel: Comparing lists in scheme - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by GoZoner for Comparing lists in scheme

The function eq? looks at whether the 'two lists are the same list'; whereas, equal? looks at 'whether all the values and their order is the same'. In C, think eq? is == but equal? is while (l1...

View Article



Comparing lists in scheme

I wonder why the following piece of code gives the #f output:=> (define a (cons 3 '()))=> (define a (cons 3 '()))=> (eq? a b);Value: #fWhen comparing the lists with eq?, do we look at whether...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images