Love Proven by Structural Induction
She asked me if I'll always love her; I said I'll proved it through structural induction in @ReasonML 1 type you = 2 | Present 3 | Future(you); 5 module I = { 6 let rec love = you => 7 switch (you) { 8 | Present => true 9 | Future(you) => love(you) 10 }; 11 }; 13 assert( 14 I.love(/* any type of you */) 15 );
A programming joke shows a person proving that they will always love someone using structural induction in ReasonML. The code defines love as true in the present and recursively applies love to the future, humorously turning a romantic promise into a formal proof for every possible version of the person. It is shared as a nerdy, affectionate reaction to someone asking for reassurance. EN: A programming joke shows a person proving that they will always love someone using structural induction in ReasonML. The code defines love as true in the present and recursively applies love to the future, humorously turning a romantic promise into a formal proof for every possible version of the person. It is shared as a nerdy, affectionate reaction to someone asking for reassurance.
- @profunctor_io / 957 2018-06-13
- Type
- image
- Size
- 726×800 · 55.4 KiB
- Mood
- nerdy affectionate
- Language
- en
- Added