This program expands to a duplicate identifier error. Removing qi/list from the requires expands successfully.
#lang racket
(require qi qi/list)
(define ((get-ith v) i)
(vector-ref v i))
(define-qi-syntax-rule (sum)
(~> (-< (~> get-ith (as ref))
(~> vector-length (as nrows)))
(range 0 nrows)
(map ref)
(foldl + 0)))
(define x (for/vector ([i (in-range 10)]) (random)))
(~> (x) (sum))
let: duplicate identifier
at: nrows
in: (let ((nrows undefined) (ref undefined) (nrows undefined) (ref undefined) (nrows undefined) (ref undefined) (nrows undefined) (ref undefined)) (qi0->racket (thread (tee (thread (esc (#%host-expression get-ith)) (thread (esc (λ (ref2) (set! ref ref...
This program expands to a duplicate identifier error. Removing
qi/listfrom the requires expands successfully.