File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -308,9 +308,9 @@ val bind: ('A -> M<'B>) -> M<'A> -> M<'B>
308
308
``` fsharp
309
309
type person = {email: string; name: string}
310
310
let validatePerson input =
311
- if validEmail (fst input) then
311
+ if invalidEmail (fst input) then
312
312
Error "Email not valid"
313
- elif validName (snd input) then
313
+ elif invalidName (snd input) then
314
314
Error "Name not valid"
315
315
else
316
316
Ok {email = fst input; name = snd input }
@@ -319,9 +319,9 @@ let validatePerson input =
319
319
note:
320
320
321
321
``` fsharp
322
- let validEmail (str: string) =
322
+ let invalidEmail (str: string) =
323
323
not (str.Contains("@"))
324
- let validName (str: string) =
324
+ let invalidName (str: string) =
325
325
not (str.Contains(" "))
326
326
```
327
327
You can’t perform that action at this time.
0 commit comments