`from` / `getOrElse`, `maybe`
Something I find myself doing a lot is: Loaded.bifold( () => [], xs => xs )
, or equivalent. Especially when providing a non sst api on top of an sst api.
I think we should go with the .getOrElse
naming from Scala. It's more verbose but from
is vague, and maybe
/ either
are not polymorphic.
Yes, either and maybe have different structures, but in SST, every case of a fold receives uses a visitor function even if it doesn't contain a value, I've found it frustrating to not do that. And it gives us an opportunity to have a standard name for all y/n types.