Permalink
Browse files

:burn: |>

  • Loading branch information...
neilpa committed Jun 24, 2015
1 parent 5e19012 commit 11952aae5013d82b3365e4c06b9e36a462ed8d7d
@@ -304,7 +304,7 @@ more tightly-scoped way.
For example:
```swift
let producer = timer(5, onScheduler: QueueScheduler.mainQueueScheduler) |> take(3)
let producer = timer(5, onScheduler: QueueScheduler.mainQueueScheduler).take(3)
// Starts just one timer, sending the dates to two different observers as they
// are generated.
@@ -53,8 +53,6 @@ Signals can be manipulated by applying [primitives][BasicOperators] to them.
Typical primitives to manipulate a single signal like `filter`, `map` and
`reduce` are available, as well as primitives to manipulate multiple signals
at once (`zip`). Primitives operate only on the `Next` events of a signal.
The `|>` operator is used to apply primitives to a signal. It can also be used
to compose basic primitives into more complex ones.
The lifetime of a signal consists of any number of `Next` events, followed by
one terminating event, which may be any one of `Error`, `Completed`, or
@@ -98,7 +96,7 @@ interrupt/cancel the work associated with the produced signal.
Just like signals, signal producers can also be manipulated via primitives
like `map`, `filter`, etc.
Every signal primitive can be “lifted” to operate upon signal producers instead,
using the `lift` method, or implicitly through the `|>` operator.
using the `lift` method.
Furthermore, there are additional primitives that control _when_ and _how_ work
is started—for example, `times`.
@@ -224,9 +224,9 @@ public final class SerialDisposable: Disposable {
/// `CompositeDisposable`.
///
/// disposable += producer
/// |> filter { ... }
/// |> map { ... }
/// |> start(sink)
/// .filter { ... }
/// .map { ... }
/// .start(sink)
///
public func +=(lhs: CompositeDisposable, rhs: Disposable?) -> CompositeDisposable.DisposableHandle {
return lhs.addDisposable(rhs)
@@ -174,7 +174,7 @@ extension MutableProperty: SinkType {
infix operator <~ {
associativity right
// Binds tighter than assignment but looser than everything else, including `|>`
// Binds tighter than assignment but looser than everything else
precedence 93
}
@@ -162,13 +162,6 @@ extension Signal: SignalType {
}
}
infix operator |> {
associativity left
// Bind tighter than assignment, but looser than everything else.
precedence 95
}
extension Signal {
/// Observes the Signal by invoking the given callbacks when events are
/// received. If the Signal has already terminated, the `interrupted`
@@ -562,19 +562,6 @@ extension SignalProducer where T: Equatable {
}
/// Applies a SignalProducer operator to a SignalProducer.
///
/// Example:
///
/// filteredProducer
/// |> startOn(UIScheduler())
/// |> start { signal in
/// signal.observe(next: { num in println(num) })
/// }
public func |> <T, E, X>(producer: SignalProducer<T, E>, @noescape transform: SignalProducer<T, E> -> X) -> X {
return transform(producer)
}
/// Creates a repeating timer of the given interval, with a reasonable
/// default leeway, sending updates on the given scheduler.
///

4 comments on commit 11952aa

@patr1ck

This comment has been minimized.

patr1ck replied Jun 25, 2015

👏👏👏

@MarcoSero

This comment has been minimized.

Contributor

MarcoSero replied Jun 25, 2015

@rhysforyou

This comment has been minimized.

Contributor

rhysforyou replied Jun 25, 2015

🎆 🎉

@carlossless

This comment has been minimized.

carlossless replied Sep 15, 2015

🎊

Please sign in to comment.