on master help sign in
Move `ignore` to Prelude.Functor

from Pruviloj.Core

commita7a5c29eb5a1de3ec67295abd6fca56b4035060f authoraiya000 <aiya000.develop@gmail.com> dateSat 17 Feb 2018, 17:17 (9 years ago) parent14f10fd
2 files changed+4−4
libs/prelude/Prelude/Functor.idr+4 libs/pruviloj/Pruviloj/Core.idr−4
libs/prelude/Prelude/Functor.idr+4
@@ -23,5 +23,9 @@ infixr 4 <$>
2323(<$>) : Functor f => (func : a -> b) -> f a -> f b
2424func <$> x = map func x
2525
26+||| Run something for effects, throwing away the return value
27+ignore : Functor f => f a -> f ()
28+ignore x = map (const ()) x
29+
2630Functor (Pair a) where
2731 map f (x, y) = (x, f y)
libs/pruviloj/Pruviloj/Core.idr−4
@@ -7,10 +7,6 @@ import Language.Reflection.Utils
77
88%access public export
99
10−||| Run something for effects, throwing away the return value
11−ignore : Functor f => f a -> f ()
12−ignore x = map (const ()) x
13−
1410||| Do nothing
1511skip : Applicative f => f ()
1612skip = pure ()