@hackage matchable0.1.2
A type class for Matchable Functors.
Categories
License
BSD-3-Clause
Maintainer
viercc@gmail.com
Links
Versions
Installation
Dependencies (6)
- base >=4.10 && <5
- containers >=0.5.10.2 && <0.7
- hashable >=1.0.1.1 && <1.5
- tagged >=0.8 && <0.9
- unordered-containers >=0.2.6 && <0.3
- vector >=0.10.9.0 && <0.13 Show all…
Dependents (2)
@hackage/matchable-th, @hackage/trie-simple
matchable
This package provides a type class Matchable, which represents
zipMatch operation which can zip two values.
zipMatch operation can fail, and it returns zipped value wrapped
in Maybe. Specifically, zipMatch returns zipped value if and only if two arguments
have exactly same shape.
Example
>>> zipMatch [1,2] ['a','b']
Just [(1,'a'), (2,'b')]
>>> zipMatch [1,2,3] ['a','b']
Nothing
See example also.