您可以在运算式中使用运算子符号,呼叫运算子程序。
You call an operator procedure by using the operator symbol in an expression.
也可以使用管线运算子来结合函式呼叫,也就是可将一个函式的输出或传回值提供给另一个函式做为输入。
You can combine function calls by using the pipeline operator, which enables the output or return value of one function to be given to another function as input.
请注意,呼叫程序码未指定第一个参数,因为它代表要套用运算子的型别,而且编译器已知道物件的型别。
Note that the first parameter is not specified by calling code because it represents the type on which the operator is being applied, and the compiler already knows the type of your object.
应用推荐