aboutsummaryrefslogtreecommitdiff
path: root/tour
diff options
context:
space:
mode:
authorCody <cody@codyq.dev>2023-03-27 04:47:00 -0500
committerCody <cody@codyq.dev>2023-03-27 04:47:00 -0500
commitbb95375f8b24141bf7dfe5a8b1bba5c995f61253 (patch)
tree10eb423cf881afaba7d854f8150a8f5d55d6d1db /tour
parentff2d00dec2317df8de0afaf56beb35e2edb70cd7 (diff)
downloadsloth-bb95375f8b24141bf7dfe5a8b1bba5c995f61253.tar.gz
hm
Diffstat (limited to 'tour')
-rw-r--r--tour/literals.sloth2
1 files changed, 1 insertions, 1 deletions
diff --git a/tour/literals.sloth b/tour/literals.sloth
index 9109645..53e29cd 100644
--- a/tour/literals.sloth
+++ b/tour/literals.sloth
@@ -68,7 +68,7 @@ if /[0-9]/ in "24" {} # impl Contains<Regex> for String
maps["foo"] # Option<i32>
maps["foo"]!! # 48 - Panics in None case
maps["foo"]! # 48 - Caller of function is responsible for None case
-maps["foo"]?.signum() ?: 0 # 1 - Provide a default for None case
+maps["foo"]?.signum() ?? 0 # 1 - Provide a default for None case
maps.keys() # ["foo", "bar"]
maps.values() # [48, 97]