I need a function which, given a graph, returns the graph diameter as an integer.
I need another function which, given a graph, uses a faster but approximate method to return the graph diameter as an integer.
I need a third function which, given a graph, returns the graph radius as an integer.
All three of these functions have an identical type signature.
Oh, now I need something which takes a regex pattern string and a haystack string, and returns 1 if the pattern is found in the haystack, otherwise 0.
And the regex "|" pattern must match longest first, not left-right.
And it needs to support "verbose" mode, which allows comments.
And it supports backreference matches.
How do you express that type?
Now I need to numerically integrate some arbitrary function "f" in the range 0.0 to 1.0. Which of the many numeric integration methods should I use which prevents runtime issues like being unable to converge?
I need another function which, given a graph, uses a faster but approximate method to return the graph diameter as an integer.
I need a third function which, given a graph, returns the graph radius as an integer.
All three of these functions have an identical type signature.
Oh, now I need something which takes a regex pattern string and a haystack string, and returns 1 if the pattern is found in the haystack, otherwise 0.
And the regex "|" pattern must match longest first, not left-right.
And it needs to support "verbose" mode, which allows comments.
And it supports backreference matches.
How do you express that type?
Now I need to numerically integrate some arbitrary function "f" in the range 0.0 to 1.0. Which of the many numeric integration methods should I use which prevents runtime issues like being unable to converge?