fp_library/typeclasses/
empty.rs

1use crate::hkt::{Apply, Kind};
2
3pub trait Empty {
4	/// forall a. Empty f => () -> f a
5	fn empty<A>() -> Apply<Self, (A,)>
6	where
7		Self: Kind<(A,)>;
8}
9/// forall a. Empty f => () -> f a
10pub fn empty<Brand, A>() -> Apply<Brand, (A,)>
11where
12	Brand: Kind<(A,)> + Empty,
13{
14	Brand::empty()
15}