Anonymous user
Algebraic data types: Difference between revisions
no edit summary
(C example has nothing to do with pattern matching) |
No edit summary |
||
Line 1:
{{task|Data Structures}}{{omit from|BBC BASIC}}
Some languages offer direct support for [[wp:Algebraic_data_type|algebraic data types]] and pattern matching on them. While this of course can always be simulated with manual tagging and conditionals, it allows for terse code which is easy to read, and can represent the algorithm directly.
|