Posts Tagged ‘pattern matching’
Ever done Erlang? Now I wondered how flexible ruby would be and if an erlang style pattern matcher can be done in ruby. As it turns out, I came pretty close:
You might recognize this:
m = matching! [ 1, [ :a, 2 ], 3 ] do
on [ a ] [...]
Filed under: 1rad, ruby | Leave a Comment
Tags: Erlang, pattern matching, ruby