Chain - An easy way to chain functions that return ok/error tuples

Maybe I’m wrong, but isn’t the catching thrown error anti-pattern?:

  • Avoid using exceptions for control-flow
  • Avoid working with invalid data

Also you can use the result library, for example this a way.

1 Like