Instead of emitting a memo block, emit a function expression and pass it as an argument to derived (which will then create a computed). The naming of 'derived' needs to be tweaked.