Small change to asap to call function as a pure function (cf. promises)