Skip to content

Commit

Permalink
Update introduction.md
Browse files Browse the repository at this point in the history
minor fixes to typos (variable name & operators). I believe ++ should be <> ?
  • Loading branch information
michaeldesu authored Oct 6, 2023
1 parent 5de2e11 commit 8ddf28d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions concepts/custom-types/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Custom type variants can be pattern matched on using case expressions.
import gleam/int
import gleam/float
pub fn describe(number: Number) -> String {
case flexibleNumber {
SomeFloat(f) -> "Float: " ++ float.to_string(f)
SomeInt(i) -> "Int: " ++ int.to_string(i)
pub fn describe(flexible_number: Number) -> String {
case flexible_number {
SomeFloat(f) -> "Float: " <> float.to_string(f)
SomeInt(i) -> "Int: " <> int.to_string(i)
Invalid -> "Neither a float nor an int"
}
}
Expand Down

0 comments on commit 8ddf28d

Please sign in to comment.