Simple algebraic dice notation parser for Gleam
3

Configure Feed

Select the types of activity you want to include in your feed.

Fix spelling mistake in function

Naomi Roberts (May 7, 2025, 4:58 PM +0100) b6395460 83e6d9f4

+2 -2
+2 -2
src/diced.gleam
··· 109 109 case splitter.split(splitter, modifiers) { 110 110 #("", "", "") -> Ok(list.reverse(found)) 111 111 #("", mod, rest) -> { 112 - let #(rest, value) = width_modifier_value(rest) 112 + let #(rest, value) = with_modifier_value(rest) 113 113 let modifier = case mod { 114 114 "kh" -> KeepHighest(value) 115 115 "kl" -> KeepLowest(value) ··· 128 128 } 129 129 } 130 130 131 - fn width_modifier_value(string: String) -> #(String, Int) { 131 + fn with_modifier_value(string: String) -> #(String, Int) { 132 132 case do_with_modifier_value(string, 0) { 133 133 #(a, v) if v == 0 -> #(a, 1) 134 134 #(a, v) -> #(a, v)