HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[code.haxe.org] Abstract types - Pipe using Abstract Operator Overloading #122

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Pipe using Abstract Operator Overloading - Abstract types - Haxe programming language cookbook

The following example demonstrates how the pipe operator is used to clean up nested function calls with Abstract Operator Overloading.

https://code.haxe.org/category/abstract-types/pipe.html

danielo515 commented 1 year ago

Compiler says that operators must accept two parameters, mandatory

danielo515 commented 1 year ago

Compiler says that operators must accept two parameters, mandatory

OK, that only happens if you make the method static. Normal methods does not have that limitation