You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a newbie writing documentation for newbies, in this case about Prisms.
Question 1: There are three functions that seem to be about checking if a value is the one a prism focuses on: is, isn't, and matching. matching is the only one I can get to work. How does one use is and isn't?
That seems sensible: If the match is "right", the value is extracted; otherwise, you are "left" with the original value. But let's look at what happens when we look at a specific (only) Solid value:
I understand why the types dictate those results, but I don't understand the inconsistency between how Prisms created with prism' (or prism) and those created with only behave. Why don't they both provide the failing value?
The text was updated successfully, but these errors were encountered:
I'm a newbie writing documentation for newbies, in this case about Prisms.
Question 1: There are three functions that seem to be about checking if a value is the one a prism focuses on:
is
,isn't
, andmatching
.matching
is the only one I can get to work. How does one useis
andisn't
?Question 2: Now let's consider this type:
Let's suppose I create a prism that selects out the
Solid
case:Given values
solid
andlinear
,matching
gives me these results:That seems sensible: If the match is "right", the value is extracted; otherwise, you are "left" with the original value. But let's look at what happens when we look at a specific (
only
)Solid
value:matching
works differently:I understand why the types dictate those results, but I don't understand the inconsistency between how Prisms created with
prism'
(orprism
) and those created withonly
behave. Why don't they both provide the failing value?The text was updated successfully, but these errors were encountered: