Skip allocations on tuples

This commit is contained in:
mdgriffith 2020-08-21 19:04:54 -04:00
parent 5b0eca21c0
commit 928be54743

View File

@ -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.