[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/bug-31311-pcase-doc abf7e6a 03/18: zonk "side-effectin
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] fix/bug-31311-pcase-doc abf7e6a 03/18: zonk "side-effecting" Issue comment lines |
Date: |
Tue, 15 May 2018 05:45:52 -0400 (EDT) |
branch: fix/bug-31311-pcase-doc
commit abf7e6ae478ed2588d57ed8f8c1822f5f2662601
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>
zonk "side-effecting" Issue comment lines
---
doc/lispref/control.texi | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index e5d2440..0b98e03 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -446,7 +446,6 @@ forms described for @var{predfun}, above.
This is like @code{pred},
except that it tests the result against @var{pattern},
rather than against a boolean truth value.
address@hidden Issue: Same as below (side-effecting FUNCTION or PATTERN).
@item (guard @var{boolean-expression})
Matches if @var{boolean-expression} evaluates to address@hidden This
@@ -456,28 +455,6 @@ previous U-patterns. Typically used inside an @code{and}
U-pattern, see
below. For example, @address@hidden(and x (guard (< x 10)))}} is a pattern
which matches any number smaller than 10 and let-binds the variable
@code{x} to that number.
address@hidden What about side-effecting (ugh-lý :-D) BOOLEAN-EXPRESSION
address@hidden that mutates let-bound vars? Any (dis-)guarantees? Consider:
address@hidden
address@hidden (defun hmm (n)
address@hidden (pcase n
address@hidden ((and x (guard (< (decf x) 10)))
address@hidden (list 'single-digit x))))
address@hidden
address@hidden (hmm 42) => nil
address@hidden (hmm 11) => nil
address@hidden (hmm 10) => (single-digit 10)
address@hidden (hmm 1) => (single-digit 1)
address@hidden (hmm 0) => (single-digit 0)
address@hidden
address@hidden Maybe there is some discussion of this already?
address@hidden Issue: Pick one:
address@hidden - This is a design decision. Document the limitation
address@hidden (i.e., BOOLEAN-EXPRESSION SHOULD NOT be side-effecting).
address@hidden - This is an unforseen case; behavior is based on the
address@hidden implementation (‘cond’ + redundant ‘let*’ expansion)
address@hidden and is considered {undefined, wontfix, futurefix}.
address@hidden Leave undocumented for now.
@item (let @var{pattern} @var{expr})
Evaluates @var{expr} to get @var{exprval}
@@ -486,7 +463,6 @@ and matches if @var{exprval} matches @var{pattern}.
@var{pattern} can bind symbols to values using the @var{symbol}
U-pattern. For example:
@address@hidden((or `(key . ,val) (let val 5)) val)}}.)
address@hidden Issue: Same as above (side-effecting EXPRESSION).
@item (or @var{pattern1} @address@hidden)
Matches if one the argument U-patterns matches. As soon as the first
- [Emacs-diffs] fix/bug-31311-pcase-doc updated (2eb044b -> 484c3ae), Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 5c3da48 01/18: (docstring) [2nd para] use ‘PATTERN’ as proper noun, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 492dd6c 04/18: use address@hidden, address@hidden as proper noun, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc b3fb63e 05/18: zonk "Depending on the pattern" para (superseded by SYMBOL expansion), Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 15378c3 08/18: do ‘s/predicate function/predicate/’, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc f2610c6 11/18: for ‘app’, refine comparison w/ ‘pred’, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc abf7e6a 03/18: zonk "side-effecting" Issue comment lines,
Thien-Thi Nguyen <=
- [Emacs-diffs] fix/bug-31311-pcase-doc c0f0f18 07/18: zonk later address@hidden introduction (superseded), Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 0f1c170 06/18: settle on address@hidden pcase’ text, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc dc4b413 09/18: do ‘s/predfun/function/g’, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 5e2eeee 17/18: transform ‘get-return-code’ example, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc e276ce7 13/18: transform ‘guard’ example, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc ff41db6 12/18: (docstring) quote ‘pcase’ in QPAT docstring, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc bd79b06 15/18: add anchor/heading to examples; fix typo, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc d5dfe0e 02/18: expand on SYMBOL, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 0dffb69 10/18: (docstring) do s/predicate function/predicate/g, s/specified/formed/g, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 4ede733 16/18: refine example header, grouping, Thien-Thi Nguyen, 2018/05/15