mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Nothing ever flat maps a Free
.
This commit is contained in:
parent
4169d8d554
commit
02af784036
@ -95,13 +95,6 @@ public enum Free<Leaf, Annotation, Value>: CustomDebugStringConvertible {
|
||||
}
|
||||
|
||||
|
||||
// MARK: Monad
|
||||
|
||||
public func flatMap<C>(@noescape transform: Value throws -> Free<Leaf, Annotation, C>) rethrows -> Free<Leaf, Annotation, C> {
|
||||
return try analysis(ifPure: transform, ifRoll: { try .Roll($0, $1.map { try $0.flatMap(transform) }) })
|
||||
}
|
||||
|
||||
|
||||
// MARK: CustomDebugStringConvertible
|
||||
|
||||
public var debugDescription: String {
|
||||
|
Loading…
Reference in New Issue
Block a user