# HG changeset patch # User Steve Losh # Date 1481823397 18000 # Node ID 6f1c9878ddbea8ccc443e0f19c7e245545291014 # Parent e9910edd311c017ed55502d29e8e8f2fd51ee61c Fix some docs diff -r e9910edd311c -r 6f1c9878ddbe DOCUMENTATION.markdown --- a/DOCUMENTATION.markdown Wed Dec 14 17:44:19 2016 -0500 +++ b/DOCUMENTATION.markdown Thu Dec 15 12:36:37 2016 -0500 @@ -238,7 +238,7 @@ &BODY BODY) -Perform `body` with `var` to the results of `lookup-expr`, when valid. +Perform `body` with `var` bound to the result of `lookup-expr`, when valid. `lookup-expr` should be an expression that returns two values, the first being the result (which will be bound to `var`) and the second indicating whether @@ -536,17 +536,17 @@ Examples: - (max 1 10 2) => 10 - (max) => invalid number of arguments + (max 1 10 2) ; => 10 + (max) ; => invalid number of arguments - (funcall (nullary #'max)) => nil - (funcall (nullary #'max 0)) => 0 - (funcall (nullary #'max 0) 1 10 2) => 10 + (funcall (nullary #'max)) ; => nil + (funcall (nullary #'max 0)) ; => 0 + (funcall (nullary #'max 0) 1 10 2) ; => 10 - (reduce #'max nil) => invalid number of arguments - (reduce (nullary #'max) nil) => nil - (reduce (nullary #'max :empty) nil) => :empty - (reduce (nullary #'max) '(1 10 2)) => 10 + (reduce #'max nil) ; => invalid number of arguments + (reduce (nullary #'max) nil) ; => nil + (reduce (nullary #'max :empty) nil) ; => :empty + (reduce (nullary #'max) '(1 10 2)) ; => 10 diff -r e9910edd311c -r 6f1c9878ddbe losh.lisp --- a/losh.lisp Wed Dec 14 17:44:19 2016 -0500 +++ b/losh.lisp Thu Dec 15 12:36:37 2016 -0500 @@ -269,17 +269,17 @@ Examples: - (max 1 10 2) => 10 - (max) => invalid number of arguments - - (funcall (nullary #'max)) => nil - (funcall (nullary #'max 0)) => 0 - (funcall (nullary #'max 0) 1 10 2) => 10 - - (reduce #'max nil) => invalid number of arguments - (reduce (nullary #'max) nil) => nil - (reduce (nullary #'max :empty) nil) => :empty - (reduce (nullary #'max) '(1 10 2)) => 10 + (max 1 10 2) ; => 10 + (max) ; => invalid number of arguments + + (funcall (nullary #'max)) ; => nil + (funcall (nullary #'max 0)) ; => 0 + (funcall (nullary #'max 0) 1 10 2) ; => 10 + + (reduce #'max nil) ; => invalid number of arguments + (reduce (nullary #'max) nil) ; => nil + (reduce (nullary #'max :empty) nil) ; => :empty + (reduce (nullary #'max) '(1 10 2)) ; => 10 " (lambda (&rest args) @@ -335,7 +335,7 @@ (recur ,@(mapcar #'extract-val bindings))))) (defmacro when-found (var lookup-expr &body body) - "Perform `body` with `var` to the results of `lookup-expr`, when valid. + "Perform `body` with `var` bound to the result of `lookup-expr`, when valid. `lookup-expr` should be an expression that returns two values, the first being the result (which will be bound to `var`) and the second indicating whether