math.scm 250 B

12345678910111213141516
  1. (library (math)
  2. (export sum
  3. product)
  4. (import
  5. (except (rnrs base) let-values map error)
  6. (only (guile)
  7. lambda* λ))
  8. (define sum
  9. (λ (lst)
  10. (apply + lst)))
  11. (define product
  12. (λ (lst)
  13. (apply * lst))))