mirror of
https://github.com/mdgriffith/elm-optimize-level-2.git
synced 2024-12-01 19:35:08 +03:00
Skip allocations on tuples
This commit is contained in:
parent
5b0eca21c0
commit
928be54743
@ -447,3 +447,15 @@ function map(func, list) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Skip Allocating Tuples in Case Statements
|
||||||
|
|
||||||
|
It's pretty common to put things in a tuple(or threeple) to start a case statement.
|
||||||
|
|
||||||
|
```elm
|
||||||
|
case (a, b) of
|
||||||
|
(ThingOne, ThingTwo) ->
|
||||||
|
--...
|
||||||
|
```
|
||||||
|
|
||||||
|
We could skip allocating the tuple though.
|
||||||
|
Loading…
Reference in New Issue
Block a user