quakeforge/ruamoko/scheme/Boolean.r
Brian Koropoff adba6b26dc Scheme updates:
- Boolean type (no support in lexer yet)
	- Conditionals
	- Defines (only work correctly at top level)
	- More core builtins (apply, cons, car, cdr)
	- Variable-argument functions
	- Incremental garbage collection
	- Garbage collection fixes
	- Other misc bugs fixed
2005-05-06 23:25:06 +00:00

32 lines
439 B
R

#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