File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11
11
(list (quote fn ) args
12
12
(concat (list (quote do )) body))))
13
13
14
+
15
+ " ;; @TODO Make more like Clojure Proper's apply"
16
+
14
17
(defn apply [f args]
15
- (lexical-eval (concat (list f) args)))
18
+ (lexical-eval
19
+ (concat
20
+ (list f)
21
+ (map
22
+ (fn [arg] (list quote arg))
23
+ args))))
16
24
17
25
(defn newline
18
26
[]
Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ impl Environment {
358
358
environment. insert ( Symbol :: intern ( "rand" ) , rand_fn. to_rc_value ( ) ) ;
359
359
environment. insert ( Symbol :: intern ( "rand-int" ) , rand_int_fn. to_rc_value ( ) ) ;
360
360
environment. insert ( Symbol :: intern ( "let" ) , let_macro. to_rc_value ( ) ) ;
361
+ environment. insert ( Symbol :: intern ( "map" ) , map_fn. to_rc_value ( ) ) ;
361
362
environment. insert ( Symbol :: intern ( "str" ) , str_fn. to_rc_value ( ) ) ;
362
363
environment. insert ( Symbol :: intern ( "quote" ) , quote_macro. to_rc_value ( ) ) ;
363
364
environment. insert ( Symbol :: intern ( "def" ) , def_macro. to_rc_value ( ) ) ;
You can’t perform that action at this time.
0 commit comments