cleanup a little bit
This commit is contained in:
@@ -185,15 +185,14 @@ instance Traversable List where
|
||||
traverse f Nil = return Nil
|
||||
traverse f (x :: xs) = return _::_ <*> f x <*> traverse f xs
|
||||
|
||||
-- something goes madly wrong with erasure in here.
|
||||
-- traverse_ : ∀ t f a b. {{Traversable t}} {{Applicative f}} → (a → f b) → t a → f Unit
|
||||
-- traverse_ f xs = return (const MkUnit) <*> traverse f xs
|
||||
traverse_ : ∀ t f a b. {{Traversable t}} {{Applicative f}} → (a → f b) → t a → f Unit
|
||||
traverse_ f xs = return (const MkUnit) <*> traverse f xs
|
||||
|
||||
for : {t : U → U} {f : U → U} → {{Traversable t}} {{appf : Applicative f}} → {a : U} → {b : U} → t a → (a → f b) → f (t b)
|
||||
for stuff fun = traverse fun stuff
|
||||
|
||||
-- for_ : {t : U → U} {f : U → U} → {{Traversable t}} {{appf : Applicative f}} → {a : U} → {b : U} → t a → (a → f b) → f Unit
|
||||
-- for_ stuff fun = return (const MkUnit) <*> traverse fun stuff
|
||||
for_ : {t : U → U} {f : U → U} → {{Traversable t}} {{appf : Applicative f}} → {a : U} → {b : U} → t a → (a → f b) → f Unit
|
||||
for_ stuff fun = return (const MkUnit) <*> traverse fun stuff
|
||||
|
||||
instance Applicative Maybe where
|
||||
return a = Just a
|
||||
|
||||
Reference in New Issue
Block a user