map<W> method

  1. @override
Ok<W, F> map<W>(
  1. W fn(
    1. S ok
    )
)
override

Returns a new Result, mapping any Ok value using the given transformation.

Implementation

@override
@pragma("vm:prefer-inline")
Ok<W, F> map<W>(W Function(S ok) fn) {
  final newOk = fn(ok);
  return Ok<W, F>(newOk);
}