Skip to content

Commit 0a6680f

Browse files
committed
Add a property relating maybe to composition
1 parent cc69ea0 commit 0a6680f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Data/Maybe/Properties.agda

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ maybe′-map : ∀ j (n : C) (f : A → B) ma →
9797
maybe′ j n (map f ma) ≡ maybe′ (j ∘′ f) n ma
9898
maybe′-map = maybe-map
9999

100+
maybe-∘ : {c x} (f : B C) (g : A B) f (maybe g c x) ≡ maybe (f ∘ g) (f c) x
101+
maybe-∘ {x = just _} _ _ = refl
102+
maybe-∘ {x = nothing} _ _ = refl
103+
100104
------------------------------------------------------------------------
101105
-- _<∣>_
102106

0 commit comments

Comments
 (0)