Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Created April 21, 2020 23:50
Show Gist options
  • Save MarcelineVQ/8dc162c9e30f0fd5fc468d3b9023ed52 to your computer and use it in GitHub Desktop.
Save MarcelineVQ/8dc162c9e30f0fd5fc468d3b9023ed52 to your computer and use it in GitHub Desktop.
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