DF
Size: a a a
DF
а
foo :: (Functor f) => f Int -> f Int
foo :: (Functor f) => f Int -> f Int
а
а
AZ
foo :: (Functor f) => f Int -> f Int
AZ
interface Functor f => VerifiedFunctor (f : Type -> Type) where
functorIdentity : {a : Type} -> (g : a -> a) -> ((v : a) -> g v = v) -> (x : f a) -> map g x = x
functorComposition : {a : Type} -> {b : Type} -> (x : f a) ->
(g1 : a -> b) -> (g2 : b -> c) ->
map (g2 . g1) x = (map g2 . map g1) x
VerifiedFunctor Maybe where
functorIdentity _ _ Nothing = Refl
functorIdentity g p (Just x) = rewrite p x in Refl
functorComposition Nothing g1 g2 = Refl
functorComposition (Just x) g1 g2 = Refl
AZ
AZ
AZ
AZ
foo :: (Functor f) => f Int -> f Int
а
foo :: (Functor f) => f Int -> f Int
foo :: (Functor f) => f a -> f a
AZ
В
const fn() -> i32 {
let mut vec = Vec::new();
for i in 0..10 {
vec.push(i * 2);
}
vec.iter().sum()
}
а
В
p
p
а
DF