Skip to content

Instantly share code, notes, and snippets.


Joseph Scott Stevens josephscottstevens

View GitHub Profile
josephscottstevens /
Last active Feb 7, 2018 — forked from yang-wei/
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirrors the construction. Compare to other languages, Elm comparatively supports less destructuring than other functional languages, but lets see what Elm does have!


myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))