Skip to content

Instantly share code, notes, and snippets.

@daxfohl
daxfohl / ants.clj
Created October 10, 2012 20:10 — forked from dribnet/ants.clj
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
; Note: This code cannot run for very long on clojure 1.3 because
@daxfohl
daxfohl / AlgorithmW.fs
Last active February 27, 2019 07:10 — forked from praeclarum/AlgorithmW.fs
Algorithm W - or Hindley-Milner polymorphic type inference - in F#
module AlgorithmW
// HINDLEY-MILNER TYPE INFERENCE
// Based on http://catamorph.de/documents/AlgorithmW.pdf
type Lit =
| LInt of int
| LBool of bool
type Exp =