Map a Result
Medium · Error Handling
ok is 1 for success with value, 0 for failure. Return value * 2 on success or -1 on failure. This is Result.map without using the type if you prefer.
Write mapOk(_:_:).
Next: Sort People
Medium · Error Handling
ok is 1 for success with value, 0 for failure. Return value * 2 on success or -1 on failure. This is Result.map without using the type if you prefer.
Write mapOk(_:_:).
Next: Sort People