Skip to content

Latest commit

 

History

History
50 lines (29 loc) · 924 Bytes

optionals.md

File metadata and controls

50 lines (29 loc) · 924 Bytes

optionals

module

equalFor

func equalFor someWitness, lhs, rhs

Creates an equal function, that understands optionals and maybes for a given witness.

equatableFor

func equatableFor someWitness

Creates an Equatable witness for Optionals on top of an existing witness.

from

func from maybe

Creates an optional from a Maybe-value.

isNone

func isNone

True if None. Otherwise False.

map

func map transform

Transforms Some value to a new one. Keeps None as-is. Any other values will still be mapped, but not wrapped.

orDefault

func orDefault default

Returns a default, if None given. Otherwise unwraps Some value or keeps Any as-is.