Skip to content

Commit

Permalink
Fix Person.removeByFullName error
Browse files Browse the repository at this point in the history
  • Loading branch information
omaus committed Aug 24, 2021
1 parent 76cdc09 commit 24f9872
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ISADotnet/API/Person.fs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ module Person =

/// If a person with the given FirstName, MidInitials and LastName exists in the list, removes it
let removeByFullName (firstName : string) (midInitials : string) (lastName : string) (persons : Person list) =
List.filter (fun p ->
if midInitials = "" then
p.FirstName = Some firstName && p.LastName = Some lastName
List.filter (fun p ->
if midInitials = "" then
(p.FirstName = Some firstName && p.LastName = Some lastName)
|> not
else

p.FirstName = Some firstName && p.MidInitials = Some midInitials && p.LastName = Some lastName
else
(p.FirstName = Some firstName && p.MidInitials = Some midInitials && p.LastName = Some lastName)
|> not
) persons

Expand Down

0 comments on commit 24f9872

Please sign in to comment.