on master help sign in
Minor name changes
7540bb3Edwin Brady
libs/prelude/Prelude/Foldable.idr+2−2
@@ -10,8 +10,8 @@ import Prelude.Algebra
10%default total
10%default total
11
11
12interface Foldable (t : Type -> Type) where
12interface Foldable (t : Type -> Type) where
13− foldr : (elt -> acc -> acc) -> acc -> t elt -> acc
13+ foldr : (elem -> acc -> acc) -> acc -> t elem -> acc
14− foldl : (acc -> elt -> acc) -> acc -> t elt -> acc
14+ foldl : (acc -> elem -> acc) -> acc -> t elem -> acc
15 foldl f z t = foldr (flip (.) . flip f) id t z
15 foldl f z t = foldr (flip (.) . flip f) id t z
16
16
17||| Combine each element of a structure into a monoid
17||| Combine each element of a structure into a monoid
libs/prelude/Prelude/Functor.idr+5−5
@@ -10,15 +10,15 @@ interface Functor (f : Type -> Type) where
10 ||| Apply a function across everything of type 'a' in a
10 ||| Apply a function across everything of type 'a' in a
11 ||| parameterised type
11 ||| parameterised type
12 ||| @ f the parameterised type
12 ||| @ f the parameterised type
13− ||| @ m the function to apply
13+ ||| @ func the function to apply
14− map : (m : a -> b) -> f a -> f b
14+ map : (func : a -> b) -> f a -> f b
15
15
16infixl 4 <$>
16infixl 4 <$>
17
17
18||| An infix alias for `map`, applying a function across everything of
18||| An infix alias for `map`, applying a function across everything of
19||| type 'a' in a parameterised type
19||| type 'a' in a parameterised type
20||| @ f the parameterised type
20||| @ f the parameterised type
21−||| @ m the function to apply
21+||| @ func the function to apply
22−(<$>) : Functor f => (m : a -> b) -> f a -> f b
22+(<$>) : Functor f => (func : a -> b) -> f a -> f b
23−m <$> x = map m x
23+func <$> x = map func x
24
24
test/docs003/expected+1−1
@@ -5,7 +5,7 @@ Parameters:
5 f -- a parameterised type
5 f -- a parameterised type
6
6
7Methods:
7Methods:
8− map : Functor f => (m : a -> b) -> f a -> f b
8+ map : Functor f => (func : a -> b) -> f a -> f b
9 Apply a function across everything of type 'a' in a
9 Apply a function across everything of type 'a' in a
10 parameterised type
10 parameterised type
11
11