Perl 6
Perl 6 makes easy things easy and the hard things possible. Making 2 + 2 equal 5 is an easy thing. You just need to redefine +
infix to specially treat those integers. This also works with code like (1 + 1) + (1 + 1)
I have no idea why it happens. And, 2 + 4
is still 6
, so it's not that old meaning of +
has disappearedHelp.
multi infix:<+>(2, 2) { 5 }
say 2 + 2;