Created
April 21, 2020 23:50
-
-
Save MarcelineVQ/8dc162c9e30f0fd5fc468d3b9023ed52 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module Main | |
Semigroup b => Semigroup (a -> b) where | |
f <+> g = \x => f x <+> g x | |
Monoid b => Monoid (a -> b) where | |
neutral = const neutral | |
[all] Semigroup Bool where | |
x <+> y = x && y | |
[allm] Monoid Bool using Main.all where | |
neutral = True | |
alphaNum : Char -> Bool | |
--alphaNum = (isDigit <+> isAlpha <+> neutral) @{let _ = allm in %search} | |
alphaNum = let _ = allm in (isDigit <+> isAlpha <+> neutral) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment