From e39f04be68554be8bb188d489d3d61fb978cbdd0 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 10 Oct 2021 07:35:25 -0400 Subject: Make description match example --- docs/doc/block.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/block.html') diff --git a/docs/doc/block.html b/docs/doc/block.html index 72aaecfd..a1446e75 100644 --- a/docs/doc/block.html +++ b/docs/doc/block.html @@ -214,7 +214,7 @@ ERROR

These case-style headers function exactly the same as if they were preceded by 𝕊, and can be mixed with other kinds of headers.

Predicates

-

Destructuring with a header is quite limited, only allowing matching structure and data with exact equality. A predicate, written with ?, allows you to test an arbitrary property before evaluating the rest of the body, and also serves as a limited kind of control flow. It can be thought of as an extension to a header, so that for example the following function requires the argument to have a single element and for that element to be less than zero before using the first body 1+𝕩. Otherwise it moves to the next one, an unconditional 𝕩.

+

Destructuring with a header is quite limited, only allowing matching structure and data with exact equality. A predicate, written with ?, allows you to test an arbitrary property before evaluating the rest of the body, and also serves as a limited kind of control flow. It can be thought of as an extension to a header, so that for example the following function requires the argument to have two elements and for the first to be less than the second before using the first body. Otherwise it moves to the next body, which is unconditional.

↗️
    CheckPair  { 𝕊a,b: a<b? "ok" ; "not ok" }
 
     CheckPair 3,8    # Fails destructuring
-- 
cgit v1.2.3