Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit 8822c16

Browse files
committed
core vars
1 parent 8d1b3da commit 8822c16

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

squint/corpus/core_vars.cljs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@
1313
(def log js/console.log)
1414

1515
(log (first [1 2 3]))
16+
17+
(defn foo [x]
18+
(dissoc x :foo))
19+
20+
(log (str (foo {:foo 1 :bar 2})))

squint/corpus/core_vars.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { toJs, first, get, vector, keyword, str, arrayMap } from 'cherry-cljs/cljs.core.js'
1+
import { toJs, first, dissoc, get, vector, keyword, str, arrayMap } from 'cherry-cljs/cljs.core.js'
22

33
const js_map = toJs(arrayMap(keyword("foo"), keyword("bar")));
44
console.log(js_map);
@@ -7,3 +7,9 @@ console.log(get(clj_map, keyword("foo/bar")));
77
console.log(str(clj_map));
88
const log = console.log;
99
log(first(vector(1, 2, 3)));
10+
function foo (x) {
11+
return (function () {
12+
return dissoc(x, keyword("foo"));
13+
})();
14+
};
15+
log(str(foo(arrayMap(keyword("foo"), 1, keyword("bar"), 2))));

0 commit comments

Comments
 (0)