I am trying to compare elements in two different lists in scheme, using DrRacket. If m1 is less than m2, I need to return true. Otherwise, return false. I am getting the following error:
<: contract violation expected: real? given: (3) argument position: 1st other arguments...:
Would appreciate any guidance.
Thanks!
#lang scheme
(define t '( "Apple" 3))
(define t2 '("Orange", 1))
(define compare (lambda (m1 m2)
(if (<(cdr m1)(cdr m2)) #t #f)
))
(compare t t2)