forth: Add map-hint to symbols for better perf
[jackhill/mal.git] / forth / stepA_interop.fs
index 0a4050a..af5f5d8 100644 (file)
@@ -261,12 +261,21 @@ defspecial try* { env list -- val }
         catch-env  catch0 cell+ @  TCO-eval
     endif ;;
 
+defspecial . { env coll -- rtn-list }
+    depth { old-depth }
+    coll to-list dup MalList/count @ swap MalList/start @ { count start }
+    count cells start +  start cell+  +do
+        env i @ eval as-native
+    cell +loop ;;
+
 MalSymbol
   extend mal-eval { env sym -- val }
-    0 sym env get
+    sym env env/get-addr
     dup 0= if
         drop
-        0 0 s" ' not found" sym as-native s" '" ...throw-str
+        0 0 s" ' not found" sym pr-str s" '" ...throw-str
+    else
+        @
     endif ;;
 drop