forked from steger/pr3-sose2026
Control Structures
parent
08065437a7
commit
2c634800d2
|
|
@ -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
|
||||
Loading…
Reference in New Issue