matchable: A type class for Matchable Functors.

[ bsd3, functors, library ] [ Propose Tags ]

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]
Versions [faq] 0.1.1.1, 0.1.2
Change log CHANGELOG.md
Dependencies base (>=4.10 && <5), containers (>=0.5.10.2 && <0.7), hashable (>=1.0.1.1 && <1.4), tagged (==0.8.*), unordered-containers (>=0.2.6 && <0.3), vector (>=0.10.9.0 && <0.13) [details]
License BSD-3-Clause
Author Koji Miyazato
Maintainer viercc@gmail.com
Revised Revision 1 made by viercc at 2020-07-25T10:27:27Z
Category Functors
Source repo head: git clone https://github.com/viercc/matchable -b master
Uploaded by viercc at 2018-12-31T07:26:46Z
Distributions NixOS:0.1.2
Downloads 855 total (29 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-12-31 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for matchable-0.1.2

[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.