Skip to content

Instantly share code, notes, and snippets.

Avatar

Pierre Irrmann pirrmann

View GitHub Profile
@pirrmann
pirrmann / Nat.fs
Last active Dec 25, 2015 — forked from akimboyko/Nat.fs
An implementation of basic non-negative integers, based on https://gist.github.com/akimboyko/7019648, but rewritten in a more F# idiomatic way
View Nat.fs
//An implementation of basic non-negative integers, based on https://gist.github.com/akimboyko/7019648,
//but rewritten in a more F# idiomatic way
module Naturals
open System
type Natural =
| Zero
| Succ of Natural
member x.IsZero' = x = Zero