Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Filter[A any](o lang.Option[A], f func(A) bool) lang.Option[A]
 - func FlatMap[A, B any](o lang.Option[A], f func(A) lang.Option[B]) lang.Option[B]
 - func Flatten[T any](o lang.Option[lang.Option[T]]) lang.Option[T]
 - func ForEach[A any](o lang.Option[A], f func(A))
 - func FromEither[L, R any](e lang.Either[L, R]) lang.Option[R]
 - func Map[A, B any](o lang.Option[A], f func(A) B) lang.Option[B]
 - func None[T any]() lang.Option[T]
 - func Of[T any](v T) lang.Option[T]
 - func OrElse[A any](o lang.Option[A], f func() lang.Option[A]) lang.Option[A]
 - func Sequence[A any](os []lang.Option[A]) lang.Option[[]A]
 - func Some[T any](t T) lang.Option[T]
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromEither ¶
FromEither converts an Either instance to an Option instance. If the Either instance is a Left, an empty Option is returned. Otherwise, an Option with the right value is returned.
func OrElse ¶
OrElse returns the given Option if it is defined. Otherwise, it returns the result of the given function.
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.