IdProvider

typealias IdProvider<T, I> = (T) -> I

function to derive a valid id for a given instance that does not change over time.