Last active
September 25, 2015 19:32
-
-
Save k0001/607900b3ef7b183225ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | Add a prefix and a suffix to a given monoid. Problem: which of the arguments is which? | |
surround :: (Monoid a) => a -> a -> a -> a | |
-- | Add a prefix and a suffix to a given monoid. No problem! | |
surround :: (Monoid a, prefix ~ a, suffix ~ a) => prefix -> suffix -> a -> a | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment