Give each rule or goal a unique ID to allow individual members to be
identified later. Wrapper for assign_unique_ids2/3. Note that list
order is not changed. The IDs are sequential, and allow the original
order to be restored by sorting later.
Arguments:
ListIn
- A list of rules or goals without attached IDs.
ListOut
- A list of rules or goals with unique IDs attached.