Variables In Elixir Pattern Matching — Tentamen Software Testing Blog

Image for post
Image for post
Variable Pattern Matching In Elixir

TL;DR

Pattern Matching Recap

Variables In Elixir Pattern Matching

Anonymous Variables

To make code mode readable, it is good practice to give a name for the anonymous variable, so we know which part of the pattern we ignore. _date Ignores the date part of local time.

Nesting

Dynamic Patterns

Remember

  • variable bounding
  • anonymous variable
  • dynamic pattern matching

Originally published at https://blog.tentamen.eu on January 1, 2021.

Written by

Founder of Tentamen, software testing agency.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store