Concept Flow - Recursive pattern matching
Start with input data
Match pattern with 'match'
If pattern matches base case
Return base value
Return
Combine result
Return
The function checks the input against patterns. If it matches a base case, it returns a value. Otherwise, it breaks input down and calls itself recursively, combining results.