Skip to content

Add finally to do-then-else, and ~+/~> #46

Open

Description

@AndreVanDelft

A sequential composition that happens anyway, whether the LHS ends in success or not, would be possible by adding a finally clause:

do x then y else z finally w

This would be equivalent to

do
  do x then x else z
  then w
  else w

In particular,

do x finally w

would be equivalent to

do x then w else w

A related dataflow operator ~+/~> would act like do-finally.
It transfers the Try that results from the LHS:

x ~+/~(t:Try[T])~~> y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions