diff options
Diffstat (limited to 'stdlib/source/specification/lux/abstract/functor/contravariant.lux')
-rw-r--r-- | stdlib/source/specification/lux/abstract/functor/contravariant.lux | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/stdlib/source/specification/lux/abstract/functor/contravariant.lux b/stdlib/source/specification/lux/abstract/functor/contravariant.lux deleted file mode 100644 index aa7d63d43..000000000 --- a/stdlib/source/specification/lux/abstract/functor/contravariant.lux +++ /dev/null @@ -1,32 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - [equivalence (.only Equivalence)] - [monad (.only do)]] - [control - ["[0]" function]] - [math - ["[0]" random] - [number - ["n" nat]]] - [test - ["_" property (.only Test)]]]] - [\\library - ["[0]" / (.only Functor)]]) - -(def (identity equivalence value (open "@//[0]")) - (All (_ f a) (-> (Equivalence (f a)) (f a) (Functor f) Test)) - (_.test "Law of identity." - (equivalence - (@//each function.identity value) - value))) - -(def .public (spec equivalence value functor) - (All (_ f a) (-> (Equivalence (f a)) (f a) (Functor f) Test)) - (do random.monad - [sample random.nat] - (<| (_.for [/.Functor]) - (all _.and - (..identity equivalence value functor) - )))) |