Browse files

Adding terminal function to Product.

  • Loading branch information...
1 parent a970a81 commit 6b825b5aad737342c8cf81ef99659060ed453877 @roconnor committed Apr 7, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/Control/Category/Product.hs
View
2 src/Control/Category/Product.hs
@@ -21,6 +21,8 @@ class Tensor c => Product c where
-- requires (f &&& g) . h === (f . h) &&& (g . h)
-- and (fst &&& snd) === id
(&&&) :: c x y -> c x z -> c x (y, z)
+ terminal :: c x ()
instance Product (->) where
(&&&) f g x = (f x, g x)
+ terminal _ = ()

0 comments on commit 6b825b5

Please sign in to comment.