words.scm 444 B

1234567891011121314151617181920
  1. (library (words)
  2. (export filter-vocabulary-words)
  3. (import
  4. (except (rnrs base))
  5. (only (guile)
  6. lambda* λ
  7. string=)
  8. (srfi srfi-1))
  9. (define filter-vocabulary-words
  10. (λ (words . filters)
  11. (let iter ([filters° filters]
  12. [words° words])
  13. (cond
  14. [(null? filters°) words°]
  15. [else
  16. (iter (drop filters° 1)
  17. ((first filters°) words°))])))))