From 9fda96489161933ca435939d22cb91a642c82d8b Mon Sep 17 00:00:00 2001 From: Sebastian Steger Date: Wed, 20 Aug 2025 15:03:01 +0200 Subject: [PATCH] Tuples --- haskell/01-expressions/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/haskell/01-expressions/README.md b/haskell/01-expressions/README.md index dec9b5d..c390fab 100644 --- a/haskell/01-expressions/README.md +++ b/haskell/01-expressions/README.md @@ -54,6 +54,14 @@ Expression | Type (:t) | Value | Comment ## Tuples +Expression | Type (:t) | Value | Comment +--- | --- | --- | -------- +`(1, 2)` | `(Num a, Num b) => (a, b)` | `(1, 2)` | +`(1, "hello", True)` | `(Num a => (a, String, Bool)` | `(1, "hello", True)` | +`fst (1, 2)` | `Num a => a` | `1` | +`snd (1, 2)` | `Num b => b` | `2` | +`(,) 1 2` | `Num a => a -> a -> (a, a)` | `(1, 2)` | + ## Strings ## Control Structures