Permalink
Browse files

Added the rectangular bandoid instance for (,)

  • Loading branch information...
1 parent 3ea3cc1 commit 607f3263fdaf8d61561f723cb7e923cdee345433 @ekmett committed Jul 16, 2013
Showing with 9 additions and 1 deletion.
  1. +4 −0 CHANGELOG.markdown
  2. +1 −1 semigroupoids.cabal
  3. +4 −0 src/Data/Semigroupoid.hs
View
@@ -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
@@ -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
@@ -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

0 comments on commit 607f326

Please sign in to comment.