2005-05-06 23:25:06 +00:00
|
|
|
#include "Boolean.h"
|
|
|
|
|
2011-02-14 13:39:43 +00:00
|
|
|
Boolean *trueConstant;
|
|
|
|
Boolean *falseConstant;
|
2005-05-06 23:25:06 +00:00
|
|
|
|
|
|
|
@implementation Boolean
|
|
|
|
|
|
|
|
+ (void) initialize
|
|
|
|
{
|
|
|
|
trueConstant = [Boolean new];
|
2005-05-08 10:37:57 +00:00
|
|
|
[trueConstant retain];
|
2005-05-06 23:25:06 +00:00
|
|
|
falseConstant = [Boolean new];
|
2005-05-08 10:37:57 +00:00
|
|
|
[falseConstant retain];
|
2005-05-06 23:25:06 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) trueConstant
|
|
|
|
{
|
|
|
|
return trueConstant;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) falseConstant
|
|
|
|
{
|
|
|
|
return falseConstant;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (string) printForm
|
|
|
|
{
|
|
|
|
return self == trueConstant ? "#t" : "#f";
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|