santinic / pampy

Pampy: The Pattern Matching for Python you always dreamed of.
MIT License
3.51k stars 125 forks source link

Match on 2d list ? #37

Open bgatessucks opened 4 years ago

bgatessucks commented 4 years ago

Hi, thanks for the very interesting work. Is matching 2d lists supported ? Example:

match([['a', 1, 2], ['b', 3, 4], ['a', 5, 6]], ['a', _, _], lambda x, y : [x, y])

expecting

[[1, 2], [5, 6]]