stream
- Description
- Implementation of streams
- Latest
- stream-2.3.0.tar (.sig), 2024-Mar-31, 50.0 KiB
- Maintainer
- <nicolas@petton.fr>
- Atom feed
- stream.xml
- Website
- https://elpa.gnu.org/packages/stream.html
- Browse repository
- CGit or Gitweb
- Badge
To install this package from Emacs, use package-install
or list-packages
.
Full description
This library provides an implementation of streams. Streams are implemented as delayed evaluation of cons cells. Functions defined in `seq.el' can also take a stream as input. streams could be created from any sequential input data: - sequences, making operation on them lazy - a set of 2 forms (first and rest), making it easy to represent infinite sequences - buffers (by character) - buffers (by line) - buffers (by page) - IO streams - orgmode table cells - ... All functions are prefixed with "stream-". All functions are tested in tests/stream-tests.el Here is an example implementation of the Fibonacci numbers implemented as in infinite stream: (defun fib (a b) (stream-cons a (fib b (+ a b)))) (fib 0 1) A note for developers: Please make sure to implement functions that process streams (build new streams out of given streams) in a way that no new elements in any argument stream are generated. This is most likely an error since it changes the argument stream. For example, a common error is to call `stream-empty-p' on an input stream and build the stream to return depending on the result. Instead, delay such tests until elements are requested from the resulting stream. A way to achieve this is to wrap such tests into `stream-make' or `stream-delay'. See the implementations of `stream-append' or `seq-drop-while' for example.
Old versions
stream-2.2.5.tar.lz | 2020-Feb-08 | 9.75 KiB |
stream-2.2.4.tar.lz | 2017-Apr-23 | 8.71 KiB |
stream-2.2.3.el.lz | 2016-Sep-24 | 5.51 KiB |
stream-2.2.2.el.lz | 2016-Sep-17 | 5.50 KiB |
stream-2.2.1.el.lz | 2016-Aug-02 | 4.92 KiB |
stream-2.2.0.el.lz | 2016-Mar-04 | 4.27 KiB |
stream-2.1.0.el.lz | 2015-Nov-12 | 2.99 KiB |
stream-2.0.5.el.lz | 2015-Nov-05 | 2.90 KiB |
stream-2.0.2.el.lz | 2015-Oct-31 | 2.77 KiB |
stream-2.0.1.el.lz | 2015-Oct-27 | 2.77 KiB |
stream-1.0.1.el.lz | 2015-Oct-26 | 2.82 KiB |
stream-1.0.el.lz | 2015-Oct-15 | 2.79 KiB |