The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added some type conversion prims.
[scheme.forth.jl.git]
/
scheme.4th
diff --git
a/scheme.4th
b/scheme.4th
index
1953cf9
..
644ee19
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-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
\ }}}