From e46223c2b7ac3579d174386df8e1c0aa8a48d2b0 Mon Sep 17 00:00:00 2001 From: Chouser Date: Sat, 21 Feb 2015 23:15:23 -0500 Subject: forth: Add . interop special operator and tests --- forth/types.fs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'forth/types.fs') 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? -- cgit v1.2.3