Skip to content

Commit a3df108

Browse files
committed
new format Result/main.roc
1 parent cb0b815 commit a3df108

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/Results/main.roc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ parseWithTryOp = \line ->
6868
parseWithTryOpV2 = \line ->
6969
{ before: fullName, after: birthYearStr } =
7070
line
71-
|> Str.splitFirst " was born in "
72-
|> Result.mapErr? \_ -> Err InvalidRecordFormat
71+
|> Str.splitFirst " was born in "
72+
|> Result.mapErr? \_ -> Err InvalidRecordFormat
7373
{ before: firstName, after: lastName } =
7474
fullName
75-
|> Str.splitFirst " "
76-
|> Result.mapErr? \_ -> Err InvalidNameFormat
75+
|> Str.splitFirst " "
76+
|> Result.mapErr? \_ -> Err InvalidNameFormat
7777
birthYear =
7878
Str.toU16 birthYearStr
79-
|> Result.mapErr? \_ -> Err InvalidBirthYearFormat
79+
|> Result.mapErr? \_ -> Err InvalidBirthYearFormat
8080
Ok { firstName, lastName, birthYear }
8181

8282
## This function parses a string using a given parser and returns a string to

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)