I hereby claim:
- I am bodil on github.
- I am bodil (https://keybase.io/bodil) on keybase.
- I have a public key whose fingerprint is 2D44 9044 793B 9F78 2E8B 7A0B 2374 7866 393D FC57
To claim this, I am signing this object:
| ;;; -*- lexical-binding: t -*- | |
| (require 'dash) | |
| (defun var (c) (vector c)) | |
| (defun var? (x) (vectorp x)) | |
| (defun var=? (x1 x2) (= (elt x1 0) (elt x2 0))) | |
| (defun assp (pred l) | |
| (-first (lambda (i) (funcall pred (car i))) l)) |
| /* @flow -*- mode: flow -*- */ | |
| /* | |
| * Example: | |
| * | |
| * var p = require("./parse"); | |
| * | |
| * var parser = p.str([ | |
| * p.many1(p.letter), | |
| * p.many(p.digit) |
I hereby claim:
To claim this, I am signing this object:
| ///<reference path="dts/tween.js.d.ts" /> | |
| ///<amd-dependency path="tween" /> | |
| import b = require("./bacon"); | |
| import graph = require("./graph"); | |
| import ev = require("./events"); | |
| module TweenEffects { | |
| var Tween = require("tween.js").Tween; |
| /** | |
| * Magic version of Rx.Observable.sync() that allows for adding more | |
| * Observables to the input feed while processing. | |
| * | |
| * Needs a more descriptive name maybe. | |
| */ | |
| function wat<T,U>(initialState: T, initialFeeds: Rx.IObservable<U>[], iterator: (state: T, e: U) => StateChange<T,U>): any { | |
| var sub = new Rx.BehaviorSubject(initialState); | |
| var state = initialState; |
| (ns ring.adapter.webbit | |
| (:require [clojure.string :as s] | |
| [clojure.java.io :as io]) | |
| (:import [org.webbitserver WebServer WebServers HttpHandler] | |
| [java.io File InputStream])) | |
| (defn- transform-headers [headers] | |
| (apply hash-map (mapcat (fn [e] [(s/lower-case (.getKey e)) | |
| (.getValue e)]) headers))) |
To run:
lein installomgcoreasync.cljs in a src subdirectory, project.clj and index.html in the rootlein cljsbuild once to buildindex.html in a browser and watch it go| ;;; Clojure port of http://dysphoria.net/code/hindley-milner/HindleyMilner.scala | |
| (ns hindley-milner | |
| (:require [clojure.string :as str])) | |
| (declare occurs-in? occurs-in-type?) | |
| (defn map-state | |
| "Evaluate a list of state monad values in sequence, producing | |
| a list of the results of each evaluation." |
| (ns addagram.core | |
| (:use [clojure.test] | |
| [clojure.java.io :only [reader]])) | |
| (with-test | |
| (defn sort-largest [l] | |
| (sort-by #(- (count %)) l)) | |
| (is (= ["blerk" "quux" "foo" "bar"] | |
| (sort-largest ["foo" "quux" "bar" "blerk"])))) |
| (ns ohai | |
| (:use clojure.test)) | |
| (def words | |
| '("foo" | |
| "rab" | |
| "rba")) | |
| (with-test | |
| (defn anagram? [a b] |