rhaiscript / rhai

Rhai - An embedded scripting language for Rust.
https://crates.io/crates/rhai
Apache License 2.0
3.63k stars 174 forks source link

Defining a pipeline operator? #876

Open mationai opened 2 months ago

mationai commented 2 months ago

I see rhai has operator overloading. Will it be possible to define a pipeline operator? If so, can someone provide the code to do so?

thanks.

schungx commented 2 months ago

What do you mean... something like |>?

If so, I suppose you can. |> is a reserved symbol so I think you can define a custom operator based on that...

schungx commented 1 month ago

@mationai Just out of curiosity, does it work?