How can I multiply all elements of a list together with user-defined multiplicatoin? [closed]

so currently I have my own definition of multiplication between elements but it can only multiply two elements.

MyMult[a_,b_]:=...


I want to multiply all elements in a list together with it i.e.

L = {a,b,c,d}
Ans = MyMult[MyMult[MyMult[a,b],c],d]


This however is messy and I want to create a function that takes in an arbitrarily sized list and outputs this product with MyMult.

Any thoughts on a neat/efficient way of doing it? Preferably one-liner sort of deal so I can define a function with it.

• Perhaps Fold might help? – Anne Dec 7 '17 at 4:02
• Fold[myMult, L]? – kglr Dec 7 '17 at 4:04
• Thank you so much! – Aakash Lakshmanan Dec 7 '17 at 4:20
• SetAttributes[MyMult, Flat] might help. – Αλέξανδρος Ζεγγ Dec 7 '17 at 4:51

Fold[myMult, {a, b, c, d}]