Question: How to make a command based on symbols?

I a working with circuits, and was wondering whether or not it might be possible to shorten the proces of calculating parallel resistors. My idea is that using some symbol, such as || would find the equivalent resistor.

My idea is based on the fact that CrossProduct can also be done using &x command. Like so.

CrossProduct(a,b) = a &x b

 

So for resistors it would look something like:

Parallel(a,b) = a || b

 

For those interested the function for parallel resistors would be:

Parallel := (a,b) -> 1/(1/a+1/b);

Please Wait...