     }
   }
 
+  @available(*, deprecated, renamed: "compactMap(_:)")
+  public func flatMap<U>(_ transform: @escaping (Element) -> U?) -> Signal<U, Error> {
+    return compactMap(transform)
+  }
+
   /// Maps each element into an optional type and propagates unwrapped .some results.
   /// Shorthand for ```map().ignoreNil()```.
-  public func flatMap<U>(_ transform: @escaping (Element) -> U?) -> Signal<U, Error> {
+  public func compactMap<U>(_ transform: @escaping (Element) -> U?) -> Signal<U, Error> {
     return Signal { observer in
       return self.observe { event in
         switch event {

  /// Usually used on the Signal resulting from `materialize()`.
  /// - SeeAlso: `errors()`, `materialize()`
  public func elements<U, E>() -> Signal<U, NoError> where Element == Event<U, E> {
    return flatMap { $0.element }
  }

  /// Returns an observable sequence containing only the unwrapped errors from `.failed` events.
  /// Usually used on the Signal resulting from `materialize()`.
  /// - SeeAlso: `elements()`, `materialize()`
  public func errors<U, E>() -> Signal<E, NoError> where Element == Event<U, E> {
    return flatMap { $0.error }
  }
}


  }

  /// Map each event into a signal and then flatten inner signals.
  public func flatMap<O: SignalProtocol>(_ strategy: FlattenStrategy, _ transform: @escaping (Element) -> O) -> Signal<O.Element, Error> where O.Error == Error {
    return map(transform).flatten(strategy)
  }

  /// Map each event into a signal and then flatten inner signals.
  public func flatMapLatest<O: SignalProtocol>(_ transform: @escaping (Element) -> O) -> Signal<O.Element, Error> where O.Error == Error {
    return flatMap(.latest, transform)
  }

  /// Map each event into a signal and then flatten inner signals.
  public func flatMapMerge<O: SignalProtocol>(_ transform: @escaping (Element) -> O) -> Signal<O.Element, Error> where O.Error == Error {
    return flatMap(.merge, transform)
  }

  /// Map each event into a signal and then flatten inner signals.
  public func flatMapConcat<O: SignalProtocol>(_ transform: @escaping (Element) -> O) -> Signal<O.Element, Error> where O.Error == Error {
    return flatMap(.concat, transform)
  }

  /// Map failure event into another operation and continue with that operation. Also called `catch`.
