4import Control.Monad.Eff
5import Control.Monad.Eff.Console
7class Newtype t a | t -> a where
11instance newtypeMultiplicative :: Newtype (Multiplicative a) a where
13 unwrap (Multiplicative a) = a
15data Multiplicative a = Multiplicative a
17instance semiringMultiplicative :: Semiring a => Semigroup (Multiplicative a) where
18 append (Multiplicative a) (Multiplicative b) = Multiplicative (a * b)
22foldPair :: forall a s. Semigroup s => (a -> s) -> Pair a -> s
23foldPair f (Pair a b) = f a <> f b
27 . (Functor f, Newtype t a)
31ala _ f = map unwrap (f wrap)
33test = ala Multiplicative foldPair
35test1 = ala Multiplicative foldPair (Pair 2 3)
38 logShow (test (Pair 2 3))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list