Skip to content

Instantly share code, notes, and snippets.

@bobjflong
Created November 5, 2016 19:47
Show Gist options
  • Select an option

  • Save bobjflong/7d2c37044321d6188794690dce1c24f1 to your computer and use it in GitHub Desktop.

Select an option

Save bobjflong/7d2c37044321d6188794690dce1c24f1 to your computer and use it in GitHub Desktop.
adt4
value = %MyModule.Bar{}
result = MyModule.case value, [
Foo: fn(x) -> x + 1 end
]
# This fails at build time with:
# case macro not exhaustive.\nGiven [\"Foo\"].\nPossible: [\"Bar\", \"Foo\"].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment