diff options
| author | Cody <cody@codyq.dev> | 2023-03-27 04:47:00 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-03-27 04:47:00 -0500 |
| commit | bb95375f8b24141bf7dfe5a8b1bba5c995f61253 (patch) | |
| tree | 10eb423cf881afaba7d854f8150a8f5d55d6d1db /tour/literals.sloth | |
| parent | ff2d00dec2317df8de0afaf56beb35e2edb70cd7 (diff) | |
| download | sloth-bb95375f8b24141bf7dfe5a8b1bba5c995f61253.tar.gz | |
hm
Diffstat (limited to 'tour/literals.sloth')
| -rw-r--r-- | tour/literals.sloth | 2 |
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] |
