quakeforge/ruamoko/scheme/Boolean.r

33 lines
429 B
R
Raw Normal View History

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