Published
Edited
Jan 31, 2020
Fork of Untitled
2 forks
Importers
16 stars
Insert cell
Insert cell
Insert cell
cljs `(range 10)`
Insert cell
cljs `[1]`
Insert cell
cljs `{:a 1}`
Insert cell
cljs `(map inc (range 10))`
Insert cell
cljs `(clojure.string/join ["a" "b"])`
Insert cell
cljs `(clojure.string/join (reverse "reppot nee si seeK"))`
Insert cell
Insert cell
pow = cljs `(fn [x n] (reduce (fn [acc _] (* acc x)) 1 (range n)))`
Insert cell
pow(10, 2) + 20
Insert cell
Insert cell
xf = cljs `(comp (map inc) (map (partial * 20)))`
Insert cell
cljs(`(into [] xf (range 10))`, {xf: xf})
Insert cell
Insert cell
cljs = function(...args) {
// Depending on the usage `` or () args is an array of arrays or a an array of strings
var code, context, s = args[0];
if (s && typeof s.valueOf() === "string") {
code = args[0], context = args[1];
} else {
code = args[0][0];
}

return sci.toJS(sci.evalString(code, {bindings: context}));
}
Insert cell
sci = require("@borkdude/sci")
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more