quakeforge/ruamoko/scheme/Boolean.r

33 lines
439 B
R
Raw Normal View History

#include "Boolean.h"
Boolean trueConstant;
Boolean falseConstant;
@implementation Boolean
+ (void) initialize
{
trueConstant = [Boolean new];
[trueConstant makeRootCell];
falseConstant = [Boolean new];
[falseConstant makeRootCell];
}
+ (id) trueConstant
{
return trueConstant;
}
+ (id) falseConstant
{
return falseConstant;
}
- (string) printForm
{
return self == trueConstant ? "#t" : "#f";
}
@end