By the way, one way to describe idempotence is a function whose range is the fixed points of the function.
Fixed point is very close. Your idea here is that google_search_lucky(search_string), where search_string="google" returns itself. Which would be a fixed point.
The rub is that the function google_search_lucky(search_string) would in all likelihood return the URL of a website if it was to return a string (necessary for even the possibility of a fix point), so the proper fix point would be "https://www.google.com".
If I was trying to map this to mathematical ideas, I'd say the point here is that the function google_search(search_string, is_lucky) with the argument ("google", is_lucky= true) returns the _function_ google_search(search_string, is_lucky) . So it's more like the argument ("google", is_lucky= true) is an identity for the function google_search(search_string, is_lucky).
Fixed point is very close. Your idea here is that google_search_lucky(search_string), where search_string="google" returns itself. Which would be a fixed point.
The rub is that the function google_search_lucky(search_string) would in all likelihood return the URL of a website if it was to return a string (necessary for even the possibility of a fix point), so the proper fix point would be "https://www.google.com".
If I was trying to map this to mathematical ideas, I'd say the point here is that the function google_search(search_string, is_lucky) with the argument ("google", is_lucky= true) returns the _function_ google_search(search_string, is_lucky) . So it's more like the argument ("google", is_lucky= true) is an identity for the function google_search(search_string, is_lucky).