settable/settable.js
function SettableObservable(fn, context, initialValue) {

	this.lastSetValue = new SimpleObservable(initialValue);
	function observe() {
		return fn.call(context, this.lastSetValue.get());
	}
	this.handler = this.handler.bind(this);

	//!steal-remove-start
	if (process.env.NODE_ENV !== 'production') {
		canReflect.assignSymbols(this, {
			"can.getName": function() {
				return (
					canReflect.getName(this.constructor) +
					"<" +
					canReflect.getName(fn) +
					">"
				);
			}
		});
		Object.defineProperty(this.handler, "name", {
			value: canReflect.getName(this) + ".handler"
		});
		Object.defineProperty(observe, "name", {
			value: canReflect.getName(fn) + "::" + canReflect.getName(this.constructor)
		});
	}
	//!steal-remove-end

	this.observation = new Observation(observe, this);
}
function SettableObservable(fn, context, initialValue) {

	this.lastSetValue = new SimpleObservable(initialValue);
	function observe() {
		return fn.call(context, this.lastSetValue.get());
	}
	this.handler = this.handler.bind(this);

	//!steal-remove-start
	if (process.env.NODE_ENV !== 'production') {
		canReflect.assignSymbols(this, {
			"can.getName": function() {
				return (
					canReflect.getName(this.constructor) +
					"<" +
					canReflect.getName(fn) +
					">"
				);
			}
		});
		Object.defineProperty(this.handler, "name", {
			value: canReflect.getName(this) + ".handler"
		});
		Object.defineProperty(observe, "name", {
			value: canReflect.getName(fn) + "::" + canReflect.getName(this.constructor)
		});
	}
	//!steal-remove-end

	this.observation = new Observation(observe, this);
}
This supports an "internal" settable value that the `fn` can derive its value from. It's useful to `can-define`. ``` new SettableObservable(function(lastSet){ return lastSet * 5; }, null, 5) ```