From 1d1d3fe9898c939dc66a91e663e24c76bcc1b905 Mon Sep 17 00:00:00 2001 From: Brian Underwood Date: Wed, 8 Feb 2023 08:42:15 +0100 Subject: [PATCH] Bit more information about difference to `with` --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc1924e..616fa0c 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,10 @@ The `with` clause in Elixir is a way to specify a pattern-matched ["happy path"] * ...returned from the `with` (if no `else` is given) * ...given to a series of pattern matches (using `else`) -`with` also doesn't `rescue` or `catch` for you. +`with` also doesn't `rescue` or `catch` for you (for better or worse, the usefulness of that depends on the situation). + +`step_wise` requires that each step be either an `{:ok, _}` or `{:error, _}` pattern. + ## `StepWise`