[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4ceb5a2: * packages/stream/stream.el: Update stream.el to
From: |
Nicolas Petton |
Subject: |
[elpa] master 4ceb5a2: * packages/stream/stream.el: Update stream.el to v 1.1.0. |
Date: |
Mon, 26 Oct 2015 20:31:21 +0000 |
branch: master
commit 4ceb5a259068bf570fdc9dd3d1cad1b31a51f0e3
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>
* packages/stream/stream.el: Update stream.el to v 1.1.0.
---
packages/stream/stream.el | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/packages/stream/stream.el b/packages/stream/stream.el
index e1daec7..375999f 100644
--- a/packages/stream/stream.el
+++ b/packages/stream/stream.el
@@ -4,7 +4,7 @@
;; Author: Nicolas Petton <address@hidden>
;; Keywords: stream, laziness, sequences
-;; Version: 1.0.1
+;; Version: 1.1.0
;; Package-Requires: ((emacs "25"))
;; Package: stream
@@ -161,7 +161,8 @@ range is infinite."
(defun stream-rest (stream)
"Return a stream of all but the first element of STREAM."
- (cdr (stream--force (cadr stream))))
+ (or (cdr (stream--force (cadr stream)))
+ (stream-empty)))
;;; cl-generic support for streams
@@ -224,7 +225,8 @@ This function will eagerly consume the entire stream."
(cl-defmethod seq-take ((stream stream) n)
"Return a stream of the first N elements of STREAM."
- (if (zerop n)
+ (if (or (zerop n)
+ (stream-empty-p stream))
(stream-empty)
(stream-cons
(stream-first stream)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 4ceb5a2: * packages/stream/stream.el: Update stream.el to v 1.1.0.,
Nicolas Petton <=