Algebraic data types

From Rosetta Code
Revision as of 12:10, 24 May 2022 by Matu3ba (talk | contribs) (Simplify the task to enable simple syntax and simpler contribution for more languages. The tree task with algebraic data types was moved to 'wiki/Algebraic_data_types'.)
Task
Algebraic data types
You are encouraged to solve this task according to the task description, using any language you may know.

Languages may offer direct support for pattern matching. Exemplify briefly the types of patterns that one can match against.