Skip to content

Instantly share code, notes, and snippets.

View aktowns's full-sized avatar
👾

Ashley Towns aktowns

👾
View GitHub Profile
@praeclarum
praeclarum / AlgorithmW.fs
Last active February 2, 2025 14:29
Algorithm W - or Hindley-Milner polymorphic type inference - in F#
module AlgorithmW
// HINDLEY-MILNER TYPE INFERENCE
// Based on http://catamorph.de/documents/AlgorithmW.pdf
// (Now at http://web.archive.org/web/20170704013532/http://catamorph.de/documents/AlgorithmW.pdf)
type Lit =
| LInt of int
| LBool of bool
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing
;; aktowns's solution to Count a Sequence
;; https://4clojure.com/problem/22
(fn [x] (reduce #(+ %1 %2) (map (fn [_] 1) x)))