This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |