// in Clean foo:: a a a -> a | Arith a foo x y z = x + y * z // in C# public T foo(T x, T y, T z) where T : IArith { return x + y * z; }