summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ref/api-procedures.texi5
-rw-r--r--module/ice-9/boot-9.scm5
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/ref/api-procedures.texi b/doc/ref/api-procedures.texi
index e0158fd09..8ff240a14 100644
--- a/doc/ref/api-procedures.texi
+++ b/doc/ref/api-procedures.texi
@@ -717,6 +717,11 @@ compatible arity.
Return X.
@end deffn
+@deffn {Scheme Procedure} and=> value proc
+When @var{value} is @code{#f}, return @code{#f}. Otherwise, return
+@code{(@var{proc} @var{value})}.
+@end deffn
+
@node Procedure Properties
@subsection Procedure Properties and Meta-information
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index ced3a2841..8461ee80d 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -944,7 +944,10 @@ VALUE."
(lambda _
value))
-(define (and=> value procedure) (and value (procedure value)))
+(define (and=> value procedure)
+ "When VALUE is #f, return #f. Otherwise, return (PROC VALUE)."
+ (and value (procedure value)))
+
(define call/cc call-with-current-continuation)
(define-syntax false-if-exception