matchable: A type class for Matchable Functors.

[ bsd3, functors, library ] [ Propose Tags ]

This package defines a type class Matchable, providing zipMatch operation for zipping two values of any container-like functor type.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.1.1, 0.1.2, 0.1.2.1
Change log CHANGELOG.md
Dependencies 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.14) [details]
License BSD-3-Clause
Author Koji Miyazato
Maintainer viercc@gmail.com
Category Functors
Source repo head: git clone https://github.com/viercc/matchable -b master
Uploaded by viercc at 2023-03-21T04:28:56Z
Distributions LTSHaskell:0.1.2.1, NixOS:0.1.2.1, Stackage:0.1.2.1
Reverse Dependencies 2 direct, 2 indirect [details]
Downloads 1393 total (34 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-03-21 [all 1 reports]

Readme for matchable-0.1.2.1

[back to package description]

Haskell CI

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.