-( = Type predicates = )
+( ==== Type predicates ==== )
:noname ( args -- boolobj )
2dup 1 ensure-arg-count
car primitive-proc-type istype? -rot 2drop boolean-type
; make-primitive procedure?
-( = Type conversions = )
+( ==== Type conversions ==== )
:noname ( args -- fixnum )
2dup 1 ensure-arg-count
charlist>symbol
; make-primitive string->symbol
-( = Arithmetic = )
+( ==== Arithmetic ==== )
: add-prim ( args -- fixnum )
2dup nil objeq? if
hide relcfa
-( = Pairs and Lists = )
+( ==== Pairs and Lists ==== )
:noname ( args -- pair )
2dup 2 ensure-arg-count
ok-symbol
; make-primitive set-cdr!
-( = Polymorphic equality testing = )
+( ==== Polymorphic equality testing ==== )
:noname ( args -- bool )
2dup 2 ensure-arg-count
objeq? boolean-type
; make-primitive eq?
+
+( ==== Input/Output ==== )
+
+:noname ( args -- finalResult )
+ 2dup 1 ensure-arg-count
+ car string-type ensure-arg-type
+
+ drop pair-type
+ pad charlist>cstr
+ pad swap load
+; make-primitive load
+
+' read make-primitive read
+
+:noname ( args -- )
+ 2dup 1 ensure-arg-count
+
+ car print cr
+
+ none
+; make-primitive write
+
+( ==== Evaluation ==== )
+
+:noname
+ \ Dummy apply procedure
+ \ Should never actually run!
+ ." Error: Dummy apply procedure executed!" cr
+; make-primitive apply