Skip to content

Commit

Permalink
small doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kutyel committed Jul 18, 2024
1 parent 28967a4 commit cc05592
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/PersonalNumber/Danish.elm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ type PersonalNumber
= PersonalNumber String


{-| If the parsing fails an error of this type is returned.
-}
type ValidationError
= InvalidLength
| InvalidDate
Expand Down Expand Up @@ -137,7 +139,7 @@ display =
toString


{-| Males have odd and females have even individual number
{-| Males have an odd serial number
-}
isMale : PersonalNumber -> Bool
isMale (PersonalNumber str) =
Expand All @@ -152,6 +154,8 @@ isMale (PersonalNumber str) =
modBy 2 serialPart == 1


{-| Females have an even serial number
-}
isFemale : PersonalNumber -> Bool
isFemale =
not << isMale
4 changes: 3 additions & 1 deletion src/PersonalNumber/Finnish.elm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ validateChecksum str =
Err InvalidChecksum


{-| Males have odd and females have even individual number
{-| Males have an odd serial number
-}
isMale : PersonalNumber -> Bool
isMale (PersonalNumber str) =
Expand All @@ -138,6 +138,8 @@ isMale (PersonalNumber str) =
modBy 2 serialPart == 1


{-| Females have an even serial number
-}
isFemale : PersonalNumber -> Bool
isFemale =
not << isMale
Expand Down

0 comments on commit cc05592

Please sign in to comment.