aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/time/day.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/time/day.lux15
1 files changed, 12 insertions, 3 deletions
diff --git a/stdlib/source/lux/time/day.lux b/stdlib/source/lux/time/day.lux
index caabc8797..3e7098e4c 100644
--- a/stdlib/source/lux/time/day.lux
+++ b/stdlib/source/lux/time/day.lux
@@ -17,7 +17,9 @@
#Friday
#Saturday)
-(structure: #export equivalence (Equivalence Day)
+(structure: #export equivalence
+ (Equivalence Day)
+
(def: (= reference sample)
(case [reference sample]
(^template [<tag>]
@@ -45,13 +47,19 @@
#Friday 5
#Saturday 6))
-(structure: #export order (Order Day)
+(structure: #export order
+ (Order Day)
+
(def: &equivalence ..equivalence)
+
(def: (< reference sample)
(n.< (..nat reference) (..nat sample))))
-(structure: #export enum (Enum Day)
+(structure: #export enum
+ (Enum Day)
+
(def: &order ..order)
+
(def: (succ day)
(case day
#Sunday #Monday
@@ -61,6 +69,7 @@
#Thursday #Friday
#Friday #Saturday
#Saturday #Sunday))
+
(def: (pred day)
(case day
#Monday #Sunday