Handbook
Glossary
with-retries ( retries quot -- result )
Vocabulary
retries
Inputs
retries
an
object
quot
an
object
Outputs
result
an
object
Definition
USING:
accessors
arrays
calendar
continuations
kernel
math
namespaces
sequences
threads
;
IN:
retries
:
with-retries
( retries quot -- result )
[
current-retries
]
dip
dup
[
[
[
[
sleep
]
unless-zero
]
]
dip
[
[
f
]
compose
[
current-retries
get
count>>
now
4array
current-retries
get
errors>>
push
f
t
]
recover
]
curry
compose
]
dip
[
[
current-retries
get
]
]
dip
[
retries-failed
]
curry
compose
[
[
[
drop
current-retries
get
next-retry
]
]
dip
]
dip
[
if
]
2curry
compose
[
[
f
]
]
dip
[
loop
]
curry
compose
with-variable
;
inline