I'm making my own little library of handy functions and I'm trying to follow Phobos's naming convention but I'm getting really confused. How do I know where things would fit?
Example:
If there was a function like foldRight
in Phobos (basically reduce
in the reverse direction), which module would I find it in?
I can think of several:
std.algorithm
: Because it's expressing an algorithmstd.array
: Because I'm likely going to use it on arraysstd.container
: Because it's used on containers, rather than single objectsstd.functional
: Because it's used mainly in functional programmingstd.range
: Because it operates on ranges as well
but I have no idea which one would be a good choice -- I could give a convincing argument for at least 3 of them.
What's the convention?