;; Extract all twin primes with non-linear pattern-matching against the infinite list of prime numbers (define $twin-primes (match-all primes (list integer) [>> [p (+ p 2)]])) ;; Enumerate first 10 twin primes (test (take 10 twin-primes)) ;=>{[3 5] [5 7] [11 13] [17 19] [29 31] [41 43] [59 61] [71 73] [101 103] [107 109]}