Show / Hide Table of Contents

    Class OptionalExtensions

    Extensions for Optional
    Inheritance
    System.Object
    OptionalExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Maki
    Assembly: Maki.dll
    Syntax
    public static class OptionalExtensions

    Methods

    | Improve this Doc View Source

    Bind<T, U>(Optional<T>, Func<T, Optional<U>>)

    Binds the given function to the Optional.
    Declaration
    public static Optional<U> Bind<T, U>(this Optional<T> optional, Func<T, Optional<U>> func)
    Parameters
    Type Name Description
    Optional<T> optional This instance.
    System.Func<T, Optional<U>> func Function to bind.
    Returns
    Type Description
    Optional<U> Optional containing the result of the function or Nothing.
    Type Parameters
    Name Description
    T Optional type.
    U Function return Optional type.
    | Improve this Doc View Source

    Map<T, U>(Optional<T>, Func<T, U>)

    Maps the given function to the Optional.
    Declaration
    public static Optional<U> Map<T, U>(this Optional<T> optional, Func<T, U> func)
    Parameters
    Type Name Description
    Optional<T> optional This instance.
    System.Func<T, U> func Function to map.
    Returns
    Type Description
    Optional<U> Optional containing the result of the function or Nothing.
    Type Parameters
    Name Description
    T Optional optional type.
    U Function return type
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX