48 words, 1 min read
Elixir ships with a couple of guards like
is_map/1
,is_binary
, etc. which are useful both when writing function clauses as well as in code. But if you find yourself using them in combinations repeatedly for data-type or other checks, a better option would be to define custom guards.
continue reading on shyr.io
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.