- fxcoprime? M Nprocedure
Are the fixnums M N coprime?
(import (only (srfi 1) filter iota)) (import (only (math-utils) fxcoprime?)) (define (coprimes n) (filter (cut fxcoprime? n <>) (iota (- n 1) 1)) )
(import (only (streams derived) stream-range stream-filter)) (import (only (math-utils) fxcoprime?)) (define (coprime-numbers-stream n) (stream-filter (cut fxcoprime? n <>) (stream-range 1 n)) )