strm.scm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. (module (arguile base type strm))
  2. (use (arguile base fn)
  3. (arguile base mac)
  4. (srfi srfi-41)
  5. (srfi srfi-45))
  6. (export scons sfn slet strm-match strm-of)
  7. (defp strm->lst stream->list)
  8. (defp scar stream-car)
  9. (defp scdr stream-cdr)
  10. (defp strm-join stream-concat)
  11. (defp strm-const stream-constant)
  12. (defp s stream-drop)
  13. (defp strm-fltr stream-filter)
  14. (defp strms-fld stream-fold)
  15. (defp strm-each stream-for-each)
  16. (defp strm-frm stream-from)
  17. (defp strm-itr stream-iterate)
  18. (defp strm-len stream-length)
  19. (defp strm-map stream-map)
  20. (defp snil stream-null)
  21. (defp snil? stream-null?)
  22. (defp strm-pair stream-pair?)
  23. (defp strm-range stream-range)
  24. (defp strm-ref stream-ref)
  25. (defp strm-rev stream-reverse)
  26. (defp strm-scan stream-scan)
  27. (defp strm-tke stream-take)
  28. (defp strm-unfld stream-unfold)
  29. (defp strm-zip stream-zip)
  30. (mac scons
  31. ((_ obj strm) #'(stream-cons obj strm)))
  32. (mac sfn
  33. ((_ args e1 e2 ...) #'(stream-lambda args e1 e2 ...)))
  34. (mac slet
  35. ((_ tag ((name val) ...) e1 e2 ...)
  36. #'(stream-let ((name val) ...) e1 e2 ...)))
  37. (mac strm-match
  38. ((_ strm-exp (pat . exp) ...)
  39. #'(stream-match strm-map (pat . exp) ...)))
  40. (mac strm-of
  41. ((_ exp rst ...) #'(stream-of exr rst ...)))