Different presets:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro get-in* | |
"Macro version of clojure.core/get-in without not-found fallback" | |
[root path] | |
(loop [root root, path path] | |
(if path | |
(recur `(get ~root ~(first path)) (next path)) | |
root))) | |
(macroexpand-1 '(get-in* [[1 2 3] [3 4 [5 6 7 8]]] [1 2 3])) | |
;; (clojure.core/get (clojure.core/get (clojure.core/get [[1 2 3] [3 4 [5 6 7 8]]] 1) 2) 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rum.core | |
(:refer-clojure :exclude [ref]) | |
(:require-macros rum.core) | |
(:require | |
[cljsjs.react] | |
[cljsjs.react.dom] | |
[goog.object :as gobj] | |
[goog.functions :as gf] | |
[goog.array :as garr] | |
[rum.cursor :as cursor]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
function defaultGetWidth () { | |
return window.innerWidth; | |
} | |
function defaultGetHeight () { | |
return window.innerHeight; | |
} |