Explorar o código

exercise 3.10: an expression that would have a different answer if `||`
were evaluated before `&&`

George C. Privon %!s(int64=2) %!d(string=hai) anos
pai
achega
d0e64ac070
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      03-typesandentities/exercises/ex3.10

+ 10 - 0
03-typesandentities/exercises/ex3.10

@@ -0,0 +1,10 @@
+`False && False || False || True`
+
+As-is, returns `True`.
+
+If the precedence of || were higher, this returns False
+
+```
+ghci> False && (False || (False || True))
+False
+```