From c199964ce84fe71c5362e2b012c63b3bb968d4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= <~@hauleth.dev> Date: Tue, 30 Jun 2026 18:55:38 +0200 Subject: [PATCH] Fix typos and add Joseph to thanks section --- content/post/guards-guards.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/post/guards-guards.md b/content/post/guards-guards.md index efa507a..ad78a26 100644 --- a/content/post/guards-guards.md +++ b/content/post/guards-guards.md @@ -9,6 +9,10 @@ Small gotcha about boolean operators in Elixir. tags = [ "beam" ] + +[[extra.thanks]] +name = "Joseph LaFreniere" +why = "for pointing out some typos" +++ Let's start with simple quiz. @@ -76,7 +80,7 @@ First one returns `true` and the rest is short circuited. Ouch, something changed… Again, we check guard, one condition `is_map_key(x, :foo) or is_integer(x)`. We -hit first clause `is_map_key(x, :foo)` and this **doesn't** return `false`, +hit the first clause `is_map_key(x, :foo)` but this **doesn't** return `false`, instead it fail. Failure in one of guard functions isn't converted to `false` but instead makes whole guard expression fail. This mean that `is_integer(x)` part will **never** be called. -- 2.51.2