For any case, there is an arbitrarily complex way to do it.
This prints “HELLO WORLD!”.
1 2 3 4 5 6 7 8 9 10 11 |
let signalProducer = SignalProducer<String, NoError> { () -> String in return "Hello world" } .map { (s) -> String in return s.uppercased() + "!" } signalProducer.startWithValues { (input) in print(input) } |