Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #98 from UrbanCompass/map
Browse files Browse the repository at this point in the history
make map public
  • Loading branch information
russellbstephens authored Sep 4, 2018
2 parents 91dd2bf + 87966a6 commit 01157aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Snail/Variable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Variable<T> {
return subject
}

func map<U>(transform: @escaping (T) -> U) -> Unique<U> {
public func map<U>(transform: @escaping (T) -> U) -> Unique<U> {
let newVariable = Unique<U>(transform(value))
asObservable().subscribe(onNext: { _ in newVariable.value = transform(self.value) })
return newVariable
Expand Down

0 comments on commit 01157aa

Please sign in to comment.