Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Haskell and F# have this feature. In F# it is called active patterns. In Haskell the feature is pattern synonyms (maybe combined with view patterns) and is used to e.g. pattern match on the prefix or suffix of a sequence-like structure, or to match a tree as a an element and left/right node without the caller seeing a bunch of other tree metadata.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: