1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Simplify the Stream-unconsing.

This commit is contained in:
Rob Rix 2015-10-06 11:48:50 -04:00
parent 5e144553fd
commit 3cdc9bd745

View File

@ -119,12 +119,7 @@ public enum FreeAlgorithm<A, B> {
}
let sum: Stream<(Diff, Int)> -> Int = {
switch $0 {
case .Nil:
return 0
case let .Cons((_, i), _):
return i
}
return $0.first?.1 ?? 0
}
var matrix: Matrix<Stream<(Diff, Int)>>!