Deviopath › Swift

Typed Errors

Medium · Error Handling

An error enum PinError.short / .mismatch. checkPin(pin, confirm) returns "ok" or the error name "short" (length < 4) or "mismatch".

Write checkPin(_:_:).

Next: Anagrams