From 928be547434f91368ff61d47ee971a910c2f711e Mon Sep 17 00:00:00 2001 From: mdgriffith Date: Fri, 21 Aug 2020 19:04:54 -0400 Subject: [PATCH] Skip allocations on tuples --- notes/transformations.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/notes/transformations.md b/notes/transformations.md index a6bfc13..7b6fce7 100644 --- a/notes/transformations.md +++ b/notes/transformations.md @@ -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.