aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/abstract/hash.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/abstract/hash.lux')
-rw-r--r--stdlib/source/test/lux/abstract/hash.lux37
1 files changed, 0 insertions, 37 deletions
diff --git a/stdlib/source/test/lux/abstract/hash.lux b/stdlib/source/test/lux/abstract/hash.lux
deleted file mode 100644
index d829d489e..000000000
--- a/stdlib/source/test/lux/abstract/hash.lux
+++ /dev/null
@@ -1,37 +0,0 @@
-(.module:
- [lux #*
- ["_" test (#+ Test)]
- [abstract
- [monad (#+ do)]
- {[0 #spec]
- [/
- [functor
- ["$." contravariant]]]}]
- [data
- [number
- ["n" nat]
- ["i" int]]]
- [math
- ["." random (#+ Random)]]]
- {1
- ["." /]})
-
-(def: #export test
- Test
- (do random.monad
- [left random.int
- right random.nat]
- (<| (_.covering /._)
- ($_ _.and
- (_.cover [/.sum]
- (let [hash (/.sum i.hash n.hash)]
- (and (n.= (\ i.hash hash left)
- (\ hash hash (#.Left left)))
- (n.= (\ n.hash hash right)
- (\ hash hash (#.Right right))))))
- (_.cover [/.product]
- (let [hash (/.product i.hash n.hash)]
- (n.= (n.+ (\ i.hash hash left)
- (\ n.hash hash right))
- (\ hash hash [left right]))))
- ))))