Skip to content

Commit

Permalink
Ior.leftNel
Browse files Browse the repository at this point in the history
  • Loading branch information
Luka Jacobowitz committed Sep 14, 2017
1 parent 26307f9 commit fab1ea3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/tut/datatypes/ior.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ case class User(name: Username, pw: Password)
def validateUsername(u: String): Failures Ior Username = {
if (u.isEmpty)
Nel.one("Can't be empty").leftIor
Ior.leftNel("Can't be empty")
else if (u.contains("."))
Ior.both(Nel.one("Dot in name is deprecated"), Username(u))
else
Expand All @@ -69,7 +69,7 @@ def validateUsername(u: String): Failures Ior Username = {
def validatePassword(p: String): Failures Ior Password = {
if (p.length < 8)
Nel.one("Password too short").leftIor
Ior.leftNel("Password too short")
else if (p.length < 10)
Ior.both(Nel.one("Password should be longer"), Password(p))
else
Expand Down

0 comments on commit fab1ea3

Please sign in to comment.