Added some type conversion prims.
[scheme.forth.jl.git] / scheme.4th
index 1953cf9..644ee19 100644 (file)
@@ -296,6 +296,17 @@ global-env setobj
     then
 ;
 
+: arg-type-error
+            bold fg red ." Incorrect argument type." reset-term cr
+            abort
+;
+
+: ensure-arg-type ( arg type -- )
+    istype? false = if
+        arg-type-error
+    then
+;
+
 include scheme-primitives.4th
 
 \ }}}