Parents
Add parents to a member who does not have any parents.
Regarding to generating multiple new member keys, I decide to go with the take(n)
approach rather than
- pass in a pedigree object, which means we go through existing keys twice in the add parent function.
- or maintain a list of used keys, which add more objects we need to keep in sync with redo/undo.
However, take(1)
returns a list, which breaks existing code. We can make _newMemberKey()
return a string if n == 1
or a list if n > 1
, but I don't like to have variable return type. Instead I created a simple wrapper function for the n == 1
case.