I am looking to execute all permutations of a list of functions, both partial and full, and add the results and put them in a list. For example, say I have three functions:
foo():
return 1
bar():
return 2
bat():
return 3
I want to execute foo(), bar(), bat(), foo() bar(), foo() bat() bar() bat(), and foo() bar() bat().
Therefore, the resulting list would be: [1, 2, 3, 3, 4, 5, 6].
Any idea how I could call all these functions? In reality I will have around 50 functions and want to record all combinations of all functions.
Thank you for any help you give.