5 ms·
The Haskell one is not that spectacular if you understand that operators are just functions in that language: λ> let 2+2=5 in 2+2 5 This simply define
by codeflo 3y ago
The Haskell one is not that spectacular if you understand that operators are just functions in that language:
λ> let 2+2=5 in 2+2
5
This simply defines a new local function that happens to be called "+". It's no different than something like this in JavaScript:
let Math = { sqrt: (x) => 42 };
console.log(Math.sqrt(16));