Reference Capabilities, Consume and Recover in Pony
bluishcoder.co.nz1 pointsby typish0 comments
type Nat = {v:Int | 0 <=v }
type Pos = {v:Int | 0 < v }
div :: Nat -> d:Pos -> {v:Nat | v <= n}
The ATS programming language (http://www.ats-lang.org) is more ML-like than Haskell-like but can have ranged integer types. Something like: fun slice {n:int | n >= 1} (a:int n, b:list)