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
{:optimizations :advanced | |
:output-dir "./target/client/production/" | |
:cache-analysis true | |
:output-modules { | |
{:id :common | |
:out "./resources/assets/js/common.js" | |
:entries '#{com.foo.common}} | |
{:id :landing | |
:out "./resources/assets/js/landing.js" | |
:entries '#{com.foo.landing} |
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
// lein cljsbuild once release | |
// d8 node_modules/immutable/dist/immutable.min.js mori.bare.js ./bench/mut_perf.js | |
// jsc node_modules/immutable/dist/immutable.min.js mori.bare.js ./bench/mut_perf.js | |
;(function() { | |
function sum(a,b) { | |
return a+b; | |
} |
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 hello-world.core) | |
(.log js/console (.toString (Symbol. "foo" "bar" "foo/bar" -1 nil))) |
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 interop.core | |
(:require [cljs.nodejs :as nodejs])) | |
(nodejs/enable-util-print!) | |
(def Immutable (js/require "immutable")) | |
(extend-type Immutable.List | |
ISeqable | |
(-seq [coll] |
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 strlenc.core | |
(:refer-clojure :exclude [==]) | |
(:require [clojure.core.logic :as l :refer [run* fresh ==]] | |
[clojure.core.logic.protocols :as lp]) | |
(:import [])) | |
(defn -strlenc | |
([str len] | |
(reify | |
lp/IConstraintStep |
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 om-tools-test.core | |
(:require | |
[om-tools.core :as om-tools :refer-macros [defcomponentk]] | |
[om-tools.dom :as dom :include-macros true] | |
[om.core :as om] | |
[om.dom :as om-dom :include-macros true])) | |
(defn basic-om-component | |
[data owner] | |
(reify |
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
var Benchmark = require('benchmark'); | |
var t = require('transducers.js'); | |
var ct = require('transducers-js'); | |
var Immutable = require('immutable'); | |
var suite = Benchmark.Suite('transducers'); | |
function benchArray(n) { | |
var arr = new Immutable.Range(0, n).toVector(); | |
suite |
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
if(typeof require != "undefined") { | |
var lodash = require("lodash"), | |
_ = require("underscore"); | |
} | |
var MapTransformer = function(f, nextTransformer) { | |
this.f = f; | |
this.nextTransformer = nextTransformer; | |
}; |
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 pldb-ex.core | |
(:refer-clojure :exclude [==]) | |
(:require [clojure.core.logic :as l | |
:refer [run run* fresh == membero nafc]] | |
[clojure.core.logic.pldb :as pldb])) | |
;sku(wun_1). sku(wun_2). sku(wun_3). | |
; | |
;booking(wun_1, monday). | |
;booking(wun_2, monday). |
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 no-rerender.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true])) | |
(enable-console-print!) | |
(def app-state (atom [{:group "A" :text "An item of group A" :color "steelblue"} | |
{:group "B" :text "An item of group B" :color "steelblue"}])) | |
(def switch-color {"steelblue" "green" |