Quiero clonar una función que está dentro de otra función y pasar un nuevo valor. Pero en este caso, ¿es posible?
function big({ message, info }) { function small() { console.log(message); } return { small } } const { small } = big({}); small() // this will print undefined /* clone to a new function with different values const small_clone = do something here with the small function, not touching the big one small_clone({ message: 'hello' }) // this will print hello */