1.3 Server
1.3.1 Sequence
1.3.2 Cargos
1.3.3 Grid
1.3.4 Engine
1.3.5 Setup
1.3.6 Agent
1.3.7 Interval
1.3.8 Dispatcher
1.3.9 TCP Server
8.14
1.3.1 Sequence🔗

Source code at sequence.rkt

The sequence is a generator for integers.

(define (make-sequence)
  (let-values ([(_ get-next) (sequence-generate (in-naturals 101))])
    get-next))

The sequence supplies new ids.

(test-case:
 "generates ids"
 (let ([sequence (make-sequence)])
   (check-equal? (sequence) 101)
   (check-equal? (sequence) 102)
   (check-equal? (sequence) 103)))