Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the very common case of wanting to return an optional result, e.g., where you would want to return Option\[T], instead return a Maybe\[T] for objects, and use MaybeInt, MaybeLong, etc. for numbers. See below about avoiding Option type.

Similar common return types are small tuples of values, and the Either\[L, R] and Try\[T] types.

See also the Cursor & Accessor Idiom below.

...