fromFlow
Creates a RandomSelector from a weighted finite Flow.
Return
A RandomSelector that selects elements based on their weights.
Parameters
flow
The finite flow of elements.
weighter
A function that determines the weight of each element.