To create an anchor to a heading in github flavored markdown.
Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:
[create an anchor](#anchors-in-markdown)
| ;; Evolving a logic programming language | |
| ;; Based on sketches at https://github.com/frenchy64/Logic-Starter/blob/master/src/logic_introduction/decl_model.clj | |
| ;; A logic statement reduces to true or false. | |
| true | |
| ;=> true | |
| false | |
| ;=> false |
| #lang typed/racket | |
| (: stx Syntax) | |
| (define stx #'bar) | |
| (syntax-case stx () | |
| [foo (identifier? #'foo) (symbol=? 'bar (syntax-e #'foo))] | |
| [_ (error 'whoops)]) |
| (defproject clojurescript "0.1.0-SNAPSHOT" | |
| :source-path "src/clj" | |
| :dev-dependencies [[swank-clojure "1.4.0-SNAPSHOT"]]) |
| ;; outlet code for implementing traditional macro expansion | |
| ;; macros | |
| (define (expand form) | |
| (cond | |
| ((variable? form) form) | |
| ((literal? form) form) | |
| ((macro? (car form)) | |
| (expand ((macro-function (car form)) form))) |
| (defn analysis->map | |
| "Convert Java Object expr into nested maps" | |
| ; result type: | |
| ; (rec X (U {:op :def | |
| ; :env {:source Object | |
| ; :line Object} | |
| ; :var Var} | |
| ; {:op :if | |
| ; :env {:source Object | |
| ; :line Object} |
| (ns datomic-play.core | |
| (:use [datomic.api :only [db q] :as d]) | |
| (:require [clojure.core.logic :as l] | |
| [clojure.pprint :as pp])) | |
| (def uri "datomic:dev://localhost:4334/hello") | |
| (defprotocol IUnifyWithDatum | |
| (unify-with-datum [u v s])) |
| (defmacro test-> | |
| "Takes an expression and a set of test/form pairs. Threads expr (via ->) | |
| through each form for which the corresponding test expression (not threaded) is true." | |
| [expr | |
| & clauses] | |
| (assert (even? (count clauses))) | |
| (let [g (gensym) | |
| pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))] | |
| `(let [~g ~expr | |
| ~@(interleave (repeat g) (map pstep (partition 2 clauses)))] |
| object TransducerUniversal { | |
| type Reduct[-A, R] = (R, A) => R | |
| trait Trans[+A, -B] { def apply[R](f: Reduct[A, R]): Reduct[B, R] } | |
| def map[A, B](f: A => B): Trans[B, A] = new Trans[B, A] { def apply[R](rf: Reduct[B, R]) = (r, a) => rf(r, f(a)) } | |
| def filter[A](p: A => Boolean): Trans[A, A] = new Trans[A, A] { def apply[R](rf: Reduct[A, R]) = (r, a) => if (p(a)) rf(r, a) else r } | |
| def comp[A,B,C](t1 : Trans[A, B], t2 : Trans[C, A]): Trans[C, B] = new Trans[C, B] { def apply[R](rf: Reduct[C, R]) = t1(t2(rf)) } | |
| def sequence[A, B](t: Trans[B, A], data: Seq[A]) = data.foldLeft(Seq[B]())(t(_ :+ _)) | |
| implicit class Compable[A,B](t1: Trans[A, B]) { |