MaybeVoid
MaybeVoid is Soares Chen's personal website to talk about his various topics of interest, including Rust and functional programming.
The MaybeVoid
Type
In Haskell, the type MaybeVoid
is defined as:
data Void
data Maybe a = Just a | Nothing
type MaybeVoid = Maybe Void
In Rust, the type MaybeVoid
is defined as:
enum Void {}
enum Option<T> { Some(T), None }
type MaybeVoid = Option<Void>;