New answers tagged

5 votes

How to list all possible string arguments of a specific function?

My first attempt involved trying Alphabet on every language from EntityList@"Language", all 9211 of them. I also dug ...
user avatar
  • 2,578
1 vote

How can I efficiently define functions with different names but doing the same stuff?

If I understand your question correctly, this is how I usually implement this. ...
user avatar
  • 1,180
1 vote

How can I efficiently define functions with different names but doing the same stuff?

Just to show another perspective that could also work on multiple definitions. Define your base function (which could have multiple definitions) ...
user avatar
  • 4,809
4 votes
Accepted

How can I efficiently define functions with different names but doing the same stuff?

To define identical functions with SetDelayed use (#[x_] := x^2 + x) & /@ {f, g, h}; This approach is also useful when ...
user avatar
  • 119k
7 votes

How can I efficiently define functions with different names but doing the same stuff?

You could do something like this: ...
user avatar
  • 3,452

Top 50 recent answers are included