Hacker News new | ask | show | jobs
by eqnoob123 4399 days ago
Here's one in Ocaml that modifies the + operator

let (+) x y = match (x,y) with (2,2) -> 5 | (x,y) -> x+y;;

1 comments

A shorter one:

let (+) 2 2 = 5 in 2+2;;