Email: @gmail.com GitHub: github.com/sgreben Twitter: twitter.com/sgrebenshchikov
Purely mechanically. Just writing down the problem statement we get: \exists f,g: \forall a,b: (f(b)=a) | (g(a)=b) where f,g are the guesses and a,b are the flips. Each guess is a function of the information available…
I'm not proposing this as a solution to the expression problem (which has actual solutions, as noted in the other comments [0] and elsewhere [1]). It is, however, an extremely simple way of implementing the table-style…
Sum types + exhaustiveness checking already do this, right? For this example: type animal = Cat | Dog type action = Sound | Eat | Attack let cat_sound () = printf "meow" let cat_attack () = printf "scratch" let…
Purely mechanically. Just writing down the problem statement we get: \exists f,g: \forall a,b: (f(b)=a) | (g(a)=b) where f,g are the guesses and a,b are the flips. Each guess is a function of the information available…
I'm not proposing this as a solution to the expression problem (which has actual solutions, as noted in the other comments [0] and elsewhere [1]). It is, however, an extremely simple way of implementing the table-style…
Sum types + exhaustiveness checking already do this, right? For this example: type animal = Cat | Dog type action = Sound | Eat | Attack let cat_sound () = printf "meow" let cat_attack () = printf "scratch" let…