1
0
Fork 0

Control Structures

main
Sebastian Steger 2025-08-20 15:03:30 +02:00
parent 08065437a7
commit 2c634800d2
1 changed files with 6 additions and 0 deletions

View File

@ -72,4 +72,10 @@ Expression | Type (:t) | Value | Comment
## Control Structures
Expression | Type (:t) | Value | Comment
--- | --- | --- | --------
`if 10/2==5 then "five" else "something else"` | `String` | `"five"` |
`case 1 of { 1 -> "small"; 2 -> "medium"; _ -> "large"}` | `String` | `"small"` | patterns are overlapping
`(let x = 5*2 in (x * 2,x /2))` | `(Fractional b, Num a) => (a, b)` | `(20,5.0)` |
## Lists