Module s2_loop

Loops.

Description

Loops.

Copyright 2011-2013 Klarna AB

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Data Types

maybe()

maybe(A, B) = {ok, A} | {error, B}

Function Index

for/2for(N, F) causes F to be called N times.
for/3
retry/1Call F every T milliseconds until it returns ok.
retry/2
retry/3

Function Details

for/2

for(N::non_neg_integer(), F::fun(() -> term()) | fun((non_neg_integer()) -> term())) -> ok

for(N, F) causes F to be called N times.

for/3

for(N, X2, F) -> any()

retry/1

retry(F::function()) -> maybe(term(), term())

Call F every T milliseconds until it returns ok. Abort after N retries unless N is infinity. Note that F is called at least once.

retry/2

retry(F, T) -> any()

retry/3

retry(F, T, N) -> any()


Generated by EDoc