If Don had intended us not to use operators, he would have left them out of the language

This commit is contained in:
Smaug123
2020-05-02 15:32:48 +01:00
parent 8e3cd2a1a1
commit 0e6316bf2a
2 changed files with 8 additions and 11 deletions

View File

@@ -74,4 +74,7 @@ module Patterns =
let (|Vec|) (Vector v : Vector<'a, S<'n>>) : 'a * Vector<'a, 'n> =
List.head v, Vector (List.tail v)
let (|Empty|) (_ : Vector<'a, Z>) = ()
let (|Empty|) (_ : Vector<'a, Z>) = ()
let ( ~- ) () : Vector<'a, Z> = Vector.empty<'a>
let ( ** ) (x : 'a) (v : Vector<'a, 'n>) = Vector.cons x v