3 ms·
Not sure that's pattern matching... I'd call that destructuring, for me pattern matching also means the ability to fail the match (and try another).
by tomp 8y ago
Not sure that's pattern matching... I'd call that destructuring, for me pattern matching also means the ability to fail the match (and try another).
- arethuza 8y agoPresumably Prolog's unification being one of the most powerful 'pattern matching' mechanisms? http://www.dai.ed.ac.uk/groups/ssp/bookpages/quickprolog/node12.html http://www.dai.ed.ac.uk/groups/ssp/bookpages/quickprolog/nod... [Amused to see that the page I linked to there is over 20 years old!]