Skip to content

Commit

Permalink
Fix snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanKramer authored Oct 6, 2024
1 parent 1855572 commit 6e33109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/DesugaringTry/main.roc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ main =
Stdout.line! (Inspect.toStr (parseNameAndYear "Alice was born in 1990"))
Stdout.line! (Inspect.toStr (parseNameAndYearTry "Alice was born in 1990"))

### begin snippet question
### start snippet question
parseNameAndYear : Str -> Result { name : Str, birthYear : U16 } _
parseNameAndYear = \str ->
{ before: name, after: birthYearStr } = Str.splitFirst? str " was born in "
Expand All @@ -15,7 +15,7 @@ parseNameAndYear = \str ->
### end snippet question

parseNameAndYearTry = \str ->
### begin snippet try
### start snippet try
str
|> Str.splitFirst " was born in "
|> Result.try \{ before: name, after: birthYearStr } ->
Expand Down

0 comments on commit 6e33109

Please sign in to comment.