View example-out.txt
datomic.client.api
Synchronous client library for interacting with Datomic.
This namespace is a wrapper for datomic.client.api.async.
Functions in this namespace that communicate with a separate
process take an arg-map with the following optional keys:
:timeout Timeout in msec.
View desktop_ocr.cljs
#! /usr/local/bin/lumo
(ns app.core
"This application watches the a directory <DIR> for screen shots
and applies an OCR to them (`tesseract`). The resulting text file is
saved to a directory called '<DIR>/OCR Screen Shots`.")
(def fs
(js/require "fs"))
View z.clj
(ns z)
(defn longest-prefix-at
[s i]
(let [max-k (. s length)]
(or (last (for [j (range 1 max-k)
:let [k (+ i j)]
:when (<= k max-k)
:let [s1 (subs s 0 j)
s2 (subs s i k)]
View permutations.clj
(defn swap
"Swap the elements at positions `i` and `j` in `v`."
{:private true}
[v i j]
(-> v
(assoc i (get v j))
(assoc j (get v i))))
;; SEE: https://en.wikipedia.org/wiki/Heap%27s_algorithm
(defn permutations [coll]
View with_repl_friendly_inspect.rb
def with_repl_friendly_inspect(&block)
x = block.call
case x
# We don't want to and sometimes can't override the #inspect method
# of these classes of values.
when Array,
Class,
FalseClass,
Hash,
View conform_case.clj
(ns conform-case
(:require [clojure.spec :as spec]))
(defn build-clause-form
{:private true}
[expression-form clause else-form]
(let [[spec binding-form & body] clause]
`(let [conform-value# (spec/conform ~spec ~expression-form)]
(if (= conform-value# ::spec/invalid)
View intero-scratch.el
(defun intero-scratch-send-paragraph ()
(interactive)
(let* ((source-code-start (save-excursion
(backward-paragraph)
(point)))
(source-code-end (save-excursion
(forward-paragraph)
(point)))
View strum.clj
(ns strum.core
(:refer-clojure :exclude [defn])
(:require
[clojure.spec :as spec]
[clojure.spec.test :as spec.test]))
;; ---------------------------------------------------------------------
;; Prelude
;; HACK: Currently, as of Clojure 1.9.0-alpha14, there is a bug with
View cek.clj
(ns machines.cek
(:require
[clojure.core.match :as match]
[clojure.spec :as spec]))
;; e ∈ Exp ::= x | (e e) | (λ (x) e)
;; x ∈ Var
;; ς ∈ Σ = Exp × Env × Kont
;; v ∈ Val ::= (λ (x) e)
;; ρ ∈ Env = Var →_fin Val × Env
View state_box.clj
(ns state-box)
(defprotocol IGetState
(-get-state [state key]))
(defprotocol IPutState
(-put-state [state key value]))
(deftype ImmutableBox [get-state put-state state]
IGetState