News for hackers. Stuff that matters.
Re:If-then-else had to be invented by samatman on Sunday December 13, 2020 @07:20PM (#25411928)
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.

Re:If-then-else had to be invented by bcheung on Monday December 14, 2020 @03:13PM (#25422615)
This 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.