Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added the rectangular bandoid instance for (,)

  • Loading branch information...
commit 607f3263fdaf8d61561f723cb7e923cdee345433 1 parent 3ea3cc1
@ekmett authored
View
4 CHANGELOG.markdown
@@ -1,3 +1,7 @@
+3.1
+---
+* Added the [rectangular band](http://en.wikipedia.org/wiki/Band_(mathematics)#Rectangular_bands) `Semigroupoid` for `(,)`. Would that make it a Bandoid?
+
3.0.3
-----
* Claim to be `Trustworthy` where necessary
View
2  semigroupoids.cabal
@@ -1,6 +1,6 @@
name: semigroupoids
category: Control, Comonads
-version: 3.0.3
+version: 3.1
license: BSD3
cabal-version: >= 1.6
license-file: LICENSE
View
4 src/Data/Semigroupoid.hs
@@ -43,6 +43,10 @@ class Semigroupoid c where
instance Semigroupoid (->) where
o = (.)
+-- | <http://en.wikipedia.org/wiki/Band_(mathematics)#Rectangular_bands>
+instance Semigroupoid (,) where
+ o (_,k) (i,_) = (i,k)
+
instance Bind m => Semigroupoid (Kleisli m) where
Kleisli g `o` Kleisli f = Kleisli $ \a -> f a >>- g
Please sign in to comment.
Something went wrong with that request. Please try again.