HaxeFoundation / code-cookbook

The Haxe Code Cookbook - A community driven resource website for learning Haxe in practise
https://code.haxe.org
112 stars 87 forks source link

Create pipe.md #159

Closed PongoEngine closed 3 years ago

PongoEngine commented 3 years ago

Adding an example to demonstrate operator overloading.

Aurel300 commented 3 years ago

Could you run the code through the formatter? I mostly noticed the spaces around :, which are generally not used in the rest of the cookbook.

markknol commented 3 years ago

Nice article, thanks for contributing! I did some formatting + small updates.

I don't understand where the pipe2, pipe3, pipe4 etc are needed for? It seems to work without too: https://try.haxe.org/#633402C3

Aurel300 commented 3 years ago

pipe2 etc would be needed if you used methods which took more than one argument.

PongoEngine commented 3 years ago

Thank you for the formatting. It looks great. I'll make sure to use a formatter next time.

PongoEngine commented 3 years ago

Are there any other tasks left on my end? I'm happy to add to the article or make changes.

markknol commented 3 years ago

No, it is all good! Thanks! Will be live in few minutes (when CI passes).