~jojo/Carth

91bd87629bc119fc87ef6f5742de79aae47f7b95 — JoJo 1 year, 4 months ago 7175fa5
Minor refactor of sieve.carth
1 files changed, 4 insertions(+), 5 deletions(-)

M examples/sieve.carth
M examples/sieve.carth => examples/sieve.carth +4 -5
@@ 6,8 6,7 @@

(define (sieve xs)
  (Iter (fun (_)
          (match (next! xs)
            (case (Pair x xs')
                  (Some (Pair x
                              (sieve (filter (<o not (flip divisible? x))
                                             xs')))))))))
          (let1 (Pair x xs') (next! xs)
            (Some (Pair x
                        (sieve (filter (<o not (flip divisible? x))
                                       xs'))))))))