mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Document `and=>'.
* module/ice-9/boot-9.scm (and=>): Add docstring. * doc/ref/api-procedures.texi (Higher-Order Functions): Add `and=>'.
This commit is contained in:
parent
ffc8eca636
commit
8cd109bf0a
2 changed files with 9 additions and 1 deletions
|
@ -717,6 +717,11 @@ compatible arity.
|
||||||
Return X.
|
Return X.
|
||||||
@end deffn
|
@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
|
@node Procedure Properties
|
||||||
@subsection Procedure Properties and Meta-information
|
@subsection Procedure Properties and Meta-information
|
||||||
|
|
||||||
|
|
|
@ -944,7 +944,10 @@ VALUE."
|
||||||
(lambda _
|
(lambda _
|
||||||
value))
|
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 call/cc call-with-current-continuation)
|
||||||
|
|
||||||
(define-syntax false-if-exception
|
(define-syntax false-if-exception
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue