Algosim documentation: repeat

repeat

Evaluates an expression over and over again, unconditionally.

Syntax

Description

repeat(expr) evaluates expr over and over again. To return from repeat, break or exit must be used, or an error must be raised.

Examples

n ≔ 0; repeat(if(round(100000⋅[sin(√n/10) + 1/(2 + sin(n/10))]) = 1, print("sols", n)); inc(n))

▐█SOLS█████████▌
│ 61141        │
│ 88954        │
│ 179809       │
│ 544862       │
│ 640493       │
│ 641686       │
│ 858770       │
│ 867436       │
│ 1097599      │
│ 1107333      │
│ 1416112      │
│ ⋮            │
└──────────────┘

See also