I tried to write an "editor" class that could retain a reference to a property on a different object for later mutation. I first wrote the editor class to receive a closure for reading, and a closure for writing. This worked. I then tried to pass the parameter in question by (inout) reference, and then generate the getter / setter pair from that. This did not work. The Swift docs does say (paraphrasing) that Swift figures out when to copy, and when to not. I think I am up against unpredictability of that limitation, but thought I'd pose the question just the same. 

Alternatively, is it possible to get a curried function for the individual getter and setter?

My code is:

```
class SomeModel : Printable {

    var a:String

    init(a:String) {
        self.a = a
    }

    var description:String {
        return "\(self.a)"
    }
}

class Editor {

    var getter:()-> String
    var setter:(String)->()

    init(getter:()-> String, setter:(String)->()) {
        self.getter = getter
        self.setter = setter
    }

    convenience init(inout bindTo:String) {
        self.init(
            getter:{ return bindTo },
            setter: { v in bindTo = v })
    }

    func read() -> String {
        return self.getter()
    }

    func write(value:String) {
        self.setter(value)
    }
}

func testBindTo() {
    var readModel =  SomeModel(a:"Did not capture by reference");
    var bindForReading = Editor(bindTo: &readModel.a)
    readModel.a = "captured by reference!"
    println(bindForReading.read())

    var writeModel =  SomeModel(a:"Did not capture by reference");
    var bindForWriting = Editor(bindTo: &writeModel.a)
    bindForWriting.write("captured by reference")
    println(writeModel)
}

testBindTo()

func testExplicitGetterSetter() {

    var readModel =  SomeModel(a:"Did not capture by reference");
    var bindForReading = Editor(
        getter: { readModel.a },
        setter: { v in readModel.a = v })
    readModel.a = "captured by reference!"
    println(bindForReading.read())

    var writeModel =  SomeModel(a:"Did not capture by reference");
    var bindForWriting = Editor(
        getter: { writeModel.a },
        setter: { v in writeModel.a = v })
    bindForWriting.write("captured by reference")
    println(writeModel)     
}

testExplicitGetterSetter()

```

The results are:

```
Did not capture by reference
Did not capture by reference
captured by reference!
captured by reference

```

Thanks!