mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Stream.rest does not force.
This commit is contained in:
parent
d62d4a33bb
commit
ab6cb6c67b
@ -31,8 +31,8 @@ public enum Stream<A>: NilLiteralConvertible, SequenceType {
|
|||||||
return uncons?.first
|
return uncons?.first
|
||||||
}
|
}
|
||||||
|
|
||||||
public var rest: Stream {
|
public var rest: Memo<Stream> {
|
||||||
return uncons?.rest.value ?? .Nil
|
return analysis(ifCons: { $1 }, ifNil: { Memo(evaluated: .Nil) })
|
||||||
}
|
}
|
||||||
|
|
||||||
public var isEmpty: Bool {
|
public var isEmpty: Bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user