Skip to content

Instantly share code, notes, and snippets.

@lagenorhynque
Last active February 12, 2018 06:37
Show Gist options
  • Select an option

  • Save lagenorhynque/5719442f2eea62e0b09f366dd01183da to your computer and use it in GitHub Desktop.

Select an option

Save lagenorhynque/5719442f2eea62e0b09f366dd01183da to your computer and use it in GitHub Desktop.
;; def in defn (rare)
(defn f [x]
(def a (* x x))
a)
;; var currentNamespace = {};
;; currentNamespace.f = function f (x) {
;; currentNamespace.a = x * x;
;; return currentNamespace.a;
;; };
;; let in defn (common)
(defn f [x]
(let [a (* x x)]
a))
;; var currentNamespace = {};
;; currentNamespace.f = function f (x) {
;; const a = x * x;
;; return a;
;; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment