Skip to content

Commit

Permalink
:burn: |>
Browse files Browse the repository at this point in the history
  • Loading branch information
neilpa committed Jun 24, 2015
1 parent 5e19012 commit 11952aa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions Documentation/FrameworkOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.

Expand Down
6 changes: 3 additions & 3 deletions ReactiveCocoa/Swift/Disposable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ReactiveCocoa/Swift/Property.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
7 changes: 0 additions & 7 deletions ReactiveCocoa/Swift/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
13 changes: 0 additions & 13 deletions ReactiveCocoa/Swift/SignalProducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

4 comments on commit 11952aa

@patr1ck
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏👏👏

@MarcoSero
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhysforyou
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎆 🎉

@carlossless
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎊

Please sign in to comment.