[racket] why is the comparimng always false

From: Roelof Wobben (r.wobben at home.nl)
Date: Fri Jun 29 16:12:24 EDT 2012

I know.
As I understand it Vanimal is the world which can exist of a Vcat or a 
Vcham.
The problem is that I cannot know which one it is and if don't do a 
define-struct Vanimal () I cannot check if the make the right world.
I will reread the chapter how to solve this.

Roelof



Op 29-6-2012 21:47, Matthias Felleisen schreef:
> On Jun 29, 2012, at 3:14 PM, Roelof Wobben wrote:
>
>> ; Te gebruiken structs
>>
>> ; Design a world program that works with both cats and chameleons:
>> ; A VAnimal is either
>> ; – a VCat
>> ; – a VCham
>> (define-struct Vanimal (Vchat Vcham))
>
> Please re-read the chapter. The above is completely wrong.
>
> EITHER a VAnimal is one of two things
> OR it is a combination of two things.
>
> You can't have it both ways. -- Matthias
>
>



Posted on the users mailing list.