Skip to content

Commit

Permalink
Updated times1p behavior for [a] (closes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Dec 20, 2012
1 parent ff1214d commit 194c8da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Data/Semigroup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ instance Semigroup b => Semigroup (a -> b) where

instance Semigroup [a] where
(<>) = (++)
times1p n x = rep n where
rep 0 = x
rep i = x ++ rep (i - 1)

instance Semigroup a => Semigroup (Maybe a) where
Nothing <> b = b
Expand Down
2 changes: 1 addition & 1 deletion semigroups.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: semigroups
category: Algebra, Data, Data Structures, Math
version: 0.8.4.1
version: 0.8.5
license: BSD3
cabal-version: >= 1.10
license-file: LICENSE
Expand Down

0 comments on commit 194c8da

Please sign in to comment.