matchable

A type class for Matchable Functors.

Version on this page:0.1.2.1
LTS Haskell 22.43:0.1.2.1@rev:1
Stackage Nightly 2024-12-05:0.1.2.1@rev:1
Latest on Hackage:0.1.2.1@rev:1

See all snapshots matchable appears in

BSD-3-Clause licensed by Koji Miyazato
Maintained by [email protected]
This version can be pinned in stack with:matchable-0.1.2.1@sha256:5dd1af7adee2992833abba4b5b85076b691aa13f436c2a0ea9f2d58efcd8f988,1575

Module documentation for 0.1.2.1

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.

Changes

0.1.2.1

  • No changes to the library itself. The package description (.cabal file) changed to the standard.

0.1.2

  • Add Data.Bimatchable

0.1.1.1

  • Initial release.