From 3b791491a055ded69d316cb2186843e23f2e7034 Mon Sep 17 00:00:00 2001 From: Boyan Date: Wed, 15 Jan 2025 21:52:02 +0100 Subject: [PATCH] vault backup: 2025-01-15 21:52:02 --- Untitled.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Untitled.md b/Untitled.md index ec8c6d7..bc1a6f8 100644 --- a/Untitled.md +++ b/Untitled.md @@ -1,6 +1,24 @@ ```haskell add :: (Int -> Int) -> Int add x y = x+y + +instance Eq Bool where + True == True = True + False == False = True + _ == _ = False + +instance (Eq a, Eq b) => Eq (a, b) where + (x1, y1) == (x2, y2) = x1 == x2 && y1 == y2 + +-- A value that exists +myValue :: Maybe Int +myValue = Just 42 + +-- A value that doesn't exist +noValue :: Maybe Int +noValue = Nothing + + ```