matchable: A type class for Matchable Functors.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

This package provides a type class Matchable, which represents zipMatch operation which can zip two values if these two have exactly same shape.


[Skip to ReadMe]

Properties

Versions0.1.1.1, 0.1.1.1
Change logCHANGELOG.md
Dependenciesbase (>=4.10 && <5), containers (>=0.5.10.2 && <0.7), hashable (>=1.0.1.1 && <1.3), tagged (==0.8.*), unordered-containers (>=0.2.6 && <0.3), vector (>=0.10.9.0 && <0.13) [details]
LicenseBSD-3-Clause
AuthorKoji Miyazato
Maintainerviercc@gmail.com
CategoryFunctors
Source repositoryhead: git clone https://github.com/viercc/matchable -b master
UploadedWed Dec 5 07:37:03 UTC 2018 by viercc

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for matchable-0.1.1.1

[back to package description]

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.