mirror of
https://github.com/Smaug123/fsharp-vectors
synced 2025-10-05 11:38:38 +00:00
If Don had intended us not to use operators, he would have left them out of the language
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user