zodimo/base-return

Basic types that communicates the possibility of failure and optional values.

Fund package maintenance!
Ko Fi

0.7.1 2025-02-15 14:04 UTC

This package is auto-updated.

Last update: 2025-03-15 14:28:45 UTC


README

2 base return type:

  • Result : represents the possibility of failure.
  • Option : represents an optional value

Result

The factory methods on result are:

  • succeed , and should be read as, succeed with this $value as success.
  • fail, and should be read as, fail with this $value as failure.