Comparing ES7 and core.async
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
ES7 | core.async |
---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
The file below is used by the search box on the official Closure API docs, which is generated by js-dossier. If we want more doc data besides name and type, we can modify js-dossier to spit those out as data.
The data is just a single array of objects at TYPES.types
.
(def foo| (bar | |
baz)) |
(define (make-link x)
`(a [[href "#top"] [class "internal"]]
,(splice x)))
$ node test/perf.js | |
Testing file with 2865 lines | |
indent: 62.065ms | |
paren: 52.131ms | |
$ /usr/sbin/system_profiler SPHardwareDataType | |
Hardware Overview: | |
Model Name: MacBook Pro |
if [ ! -f .classpath ]; then | |
classpath=`boot show -c | tee .classpath` | |
else | |
classpath=`cat .classpath` | |
fi | |
planck -c $classpath ... |
(ns sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]] | |
[cljs.pprint :refer [pprint]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |
(ns sitegen.markdown | |
(:require | |
[clojure.string :as string] | |
[planck.core :refer [file-seq slurp]] | |
[clojure.walk :refer [keywordize-keys]])) | |
(def ^:dynamic *filename*) | |
(defn error [msg] | |
(throw (str "markdown metadata error: " msg " - " *filename*))) |
function turoMiles(desiredMiles) { | |
var costPerDay = 35; | |
var costPerMileOver = 0.75; | |
var milesPerDay = 150; | |
var milesPerWeek = 1000; | |
function milesAllowed(days) { | |
var weeks = Math.floor(days / 7); | |
days = days % 7; |