map<U> method

  1. @override
  2. @useResult
None<U> map<U>(
  1. U map(
    1. T value
    )
)
override

Transforms the contained value, if any, by applying map to it.

Examples

// prints "Some(some: 2)"
print(const Some(2).map((value) => 'some: $value'));

// prints "None"
print(const None<int>().map((value) => 'some: $value'));

Implementation

@override
@useResult
None<U> map<U>(U Function(T value) map) => None<U>();