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 ArticleComparing 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
More Pages to Explore .....