4 ms·
Since Elixir 1.6 it is possible to create custom guards with `defguard`: https://hexdocs.pm/elixir/Kernel.html#defguard/1 https://hexdocs.pm/elixir/Kernel.html#
by bostonvaulter2 3y ago
Since Elixir 1.6 it is possible to create custom guards with `defguard`: https://hexdocs.pm/elixir/Kernel.html#defguard/1 https://hexdocs.pm/elixir/Kernel.html#defguard/1
- elbasti 3y agoIt's true that you can create custom guards, but they are still very limited, and they can only be made of a small list of allowed expressions [0]. [0]: https://hexdocs.pm/elixir/1.6.6/guards.html#list-of-allowed-expressions https://hexdocs.pm/elixir/1.6.6/guards.html#list-of-allowed-...