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:
parent
5e144553fd
commit
3cdc9bd745
@ -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)>>!
|
||||
|
Loading…
Reference in New Issue
Block a user