1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Nothing ever flat maps a Free.

This commit is contained in:
Rob Rix 2015-11-03 11:18:13 -05:00
parent 4169d8d554
commit 02af784036

View File

@ -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 {