diff options
author | Glenn Morris <rgm@gnu.org> | 2014-10-12 15:56:45 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-10-12 15:56:45 -0700 |
commit | b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84 (patch) | |
tree | df2e6708c30f53f071bd824c49c7f00dfbe0ffba /doc/lispref/control.texi | |
parent | ec11ab9b783fc1f2c0ce858a711baa5f728c238b (diff) | |
parent | e175fabcdd37f89db13ab90615cf0baa7bade4d9 (diff) | |
download | emacs-b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84.tar.gz |
Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.org
Diffstat (limited to 'doc/lispref/control.texi')
-rw-r--r-- | doc/lispref/control.texi | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 08d2ff35a6a..5cf6368db52 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -328,13 +328,13 @@ lexical binding): @example (defun evaluate (exp env) (pcase exp - (`(add ,x ,y) (+ (evaluate x env) (evaluate y env))) - (`(call ,fun ,arg) (funcall (evaluate fun env) (evaluate arg env))) - (`(fn ,arg ,body) (lambda (val) - (evaluate body (cons (cons arg val) env)))) - ((pred numberp) exp) - ((pred symbolp) (cdr (assq exp env))) - (_ (error "Unknown expression %S" exp)))) + (`(add ,x ,y) (+ (evaluate x env) (evaluate y env))) + (`(call ,fun ,arg) (funcall (evaluate fun env) (evaluate arg env))) + (`(fn ,arg ,body) (lambda (val) + (evaluate body (cons (cons arg val) env)))) + ((pred numberp) exp) + ((pred symbolp) (cdr (assq exp env))) + (_ (error "Unknown expression %S" exp)))) @end example Where @code{`(add ,x ,y)} is a pattern that checks that @code{exp} is a three |