I am writing a function that consumes two images and produces true if the first is larger than the second here is my code
(require 2htdp/image)
(check-expect(image1 30 40)false)
(check-expect(image1 50 20)true)
(define(image1 x y)
(begin
( circle x "solid" "blue")
(circle y "solid" "blue")
(if(> x y)
"true"
"false")))
(image1 500 100)
But it is showing the same error again and again by highlighting this portion of the code ->(circle y "solid" "blue") the error is-> define: expected only one expression for the function body, but found 2 extra parts kindly tell me what is wrong
The values
trueandfalseare simply written astrueandfalse.Note that the your function doesn't use the images, so you can write
But I guess it was just an example.
UPDATE
You can use local definitions to give names to temporary values:
UPDATE
UPDATE
Here is a complete example: