I have a method:
private def foo(f: => Future[Any]): Future[Any] = {
//code, code, code
//function return same result as function that taken
}
This works well but I need to use this in different part of my project with different types, and there are some restrictions. If I need to call some method of a type that I use, then it is not available, without casting.
For example:
if(foo("abacaba").containsSlice("dabacaba")){...}
if(foo(15) > 55){...}
Is there way to create generic function, to handle all these cases?
Future[A]or just some generic typeA?