-( ==== 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
\ args is already a list!
; make-primitive list
-:noname ( args -- pair )
+:noname ( args -- obj )
2dup 1 ensure-arg-count
car pair-type ensure-arg-type
car
; make-primitive car
-:noname ( args -- pair )
+:noname ( args -- obj )
2dup 1 ensure-arg-count
car pair-type ensure-arg-type
cdr
; make-primitive cdr
-:noname ( args -- pair )
+:noname ( args -- ok )
2dup 2 ensure-arg-count
2dup cdr car
2swap car pair-type ensure-arg-type
ok-symbol
; make-primitive set-car!
-:noname ( args -- pair )
+:noname ( args -- ok )
2dup 2 ensure-arg-count
2dup cdr car
2swap car pair-type ensure-arg-type
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 ==== )
+\ }}}
+
+\ ==== Input/Output ==== {{{
:noname ( args -- finalResult )
2dup 1 ensure-arg-count
pad swap load
; make-primitive load
-' read make-primitive read
+:noname ( args -- obj )
+ 0 ensure-arg-count
+ read
+; make-primitive read
defer display
:noname ( args -- none )
none
; make-primitive newline
-( ==== Evaluation ==== )
+\ }}}
+
+\ ==== Evaluation ==== {{{
:noname ( args -- result )
2dup car 2swap cdr
apply
; make-primitive apply
-( ==== Error System ==== )
+\ }}}
+
+\ ==== Miscellaneous ==== {{{
+( Produce a recoverable exception. )
:noname ( args -- result )
bold fg red
recoverable-exception throw
; make-primitive error
+
+( Generate a temporary unique symbol. Used in the creation of hygienic macros. )
+:noname ( args -- result )
+ 0 ensure-arg-count
+
+ [char] _ character-type nil cons
+ drop symbol-type
+; make-primitive gensym
+
+( Generate the NONE object indicating an unspecified return value. )
+:noname ( args -- result )
+ 0 ensure-arg-count
+
+ none
+; make-primitive none
+
+\ }}}
+
+\ vim:fdm=marker