소스 검색

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

George C. Privon 2 년 전
부모
커밋
d0e64ac070
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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
+```