IIUC koka can apply these optimizations dynamically when it determines data is unique via reference counting. However the paper has more details.