We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Ruby 2 Elixir • 10 years ago

simple and elegant trick, thanks for sharing! I love it how easy it is to dispatch in Elixir based on anything you like...

Shana • 9 years ago

I will point out that digit/number will match against letters too because elixir strings are just binary character lists under the covers.

<<digit::bytes-size(1)>> = "a"

Ankanna • 9 years ago

I agree with you ........ Thanks for spotting out.
In that case he needs to check one implicit condition again here `is_integer()`
However his point is all about strings... Thank You for sharing