diff options
| author | Chouser <chouser@n01se.net> | 2015-02-21 23:15:23 -0500 |
|---|---|---|
| committer | Chouser <chouser@n01se.net> | 2015-02-23 22:22:01 -0500 |
| commit | e46223c2b7ac3579d174386df8e1c0aa8a48d2b0 (patch) | |
| tree | c300a107afa499d729c23e1f7c6e07e3505e8afa /forth/types.fs | |
| parent | 2a42d8274072c44dd2d83762cc27cd810f5b8452 (diff) | |
| download | mal-e46223c2b7ac3579d174386df8e1c0aa8a48d2b0.tar.gz mal-e46223c2b7ac3579d174386df8e1c0aa8a48d2b0.zip | |
forth: Add . interop special operator and tests
Diffstat (limited to 'forth/types.fs')
| -rw-r--r-- | forth/types.fs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/forth/types.fs b/forth/types.fs index 2c4c8e0..c0144d4 100644 --- a/forth/types.fs +++ b/forth/types.fs @@ -437,7 +437,6 @@ drop MalDefault extend conj ( obj this -- this ) nip ;; - extend as-native ;; ( obj -- obj ) extend to-list drop 0 ;; extend empty? drop mal-true ;; extend sequential? drop mal-false ;; @@ -447,7 +446,7 @@ drop MalNil extend conj ( item nil -- mal-list ) drop MalList/Empty conj ;; - extend as-native drop 0 ;; + extend as-native drop nil ;; extend get 2drop ;; extend to-list drop MalList/Empty ;; extend empty? drop mal-true ;; @@ -479,7 +478,8 @@ MalSymbol else 2drop 0 endif ;; - ' as-native ' unpack-sym extend-method* + extend as-native ( this ) + unpack-sym evaluate ;; drop MalType% @@ -545,11 +545,6 @@ deftype MalNativeFn MalMap/Empty mal-fn MalNativeFn/meta ! mal-fn ; -MalNativeFn - extend as-native - MalNativeFn/xt @ ;; -drop - MalType% cell% field MalUserFn/is-macro? |
