Skip to content

Commit

Permalink
Update introduction.md (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldesu authored Oct 7, 2023
1 parent 5de2e11 commit f091a92
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 f091a92

Please sign in to comment.