@hackage matchable0.2
A type class for Matchable Functors.
Categories
License
BSD-3-Clause
Maintainer
viercc@gmail.com
Links
Versions
Installation
Tested Compilers
Dependencies (8)
- base >=4.10 && <5
- base-orphans >=0.9.3 && <1
- containers >=0.5.10.2 && <0.9
- generically >=0.1
- hashable >=1.0.1.1 && <1.6
- tagged >=0.8 && <0.9 Show all…
Dependents (2)
@hackage/matchable-th, @hackage/trie-simple
matchable
This package defines a type class Matchable,
which provides zipMatch operation for zipping two values of a
container type.
The zipMatch operation can fail. It returns the zipped value wrapped
in Maybe. Specifically, zipMatch returns zipped value if and only if two arguments
have the exactly same shape.
Example
>>> zipMatch [1,2] ['a','b']
Just [(1,'a'), (2,'b')]
>>> zipMatch [1,2,3] ['a','b']
Nothing
See examples also.