mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +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
|
||||
}
|
||||
|
||||
public var rest: Stream {
|
||||
return uncons?.rest.value ?? .Nil
|
||||
public var rest: Memo<Stream> {
|
||||
return analysis(ifCons: { $1 }, ifNil: { Memo(evaluated: .Nil) })
|
||||
}
|
||||
|
||||
public var isEmpty: Bool {
|
||||
|
Loading…
Reference in New Issue
Block a user