4 ms·
Not truly equivalent! let's define `delete(file)`, which returns 0 if it successfully deletes the file, and 1 if there's an error. ifFn(trueFn, delete('A'), d
by samatman 6y ago
Not truly equivalent!
let's define `delete(file)`, which returns 0 if it successfully deletes the file, and 1 if there's an error.
ifFn(trueFn, delete('A'), delete('B')) will not do what you want it to.
- bcheung 6y agoThis is true. In a lazy language it is the same, in imperative languages that do eager evaluation it will indeed have the problem you mention.