emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] fix/bug-31311-pcase-doc 71e4791 1/9: refill func ‘evaluat


From: Thien-Thi Nguyen
Subject: [Emacs-diffs] fix/bug-31311-pcase-doc 71e4791 1/9: refill func ‘evaluate’ (less horiz, more vert)
Date: Thu, 17 May 2018 06:41:56 -0400 (EDT)

branch: fix/bug-31311-pcase-doc
commit 71e4791c28d0f51c7045967a7a8d2933e9e96409
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>

    refill func ‘evaluate’ (less horiz, more vert)
---
 doc/lispref/control.texi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 23d7599..6695900 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -807,10 +807,13 @@ requires lexical binding, @pxref{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)))
+    (`(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))))
+                          (evaluate body (cons (cons arg val)
+                                               env))))
     ((pred numberp)     exp)
     ((pred symbolp)     (cdr (assq exp env)))
     (_                  (error "Unknown expression %S" exp))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]