Maps the value inside Ok if it exists, keeping Err unchanged.
Result<U, E> map<U>(U Function(T value) fn) { if (this is Ok<T, E>) { return Ok(fn((this as Ok<T, E>).value)); } return this as Result<U, E>; }