Similar to ocaml, F#, Elixir,
"Rust Rocks!"
|> println!;
Similar to ocaml, F#, Elixir,
"Rust Rocks!"
|> println!;
Support for macros like println will be even harder, since you'd then have to make up a fake syntax tree to pass to them
trait Println {
fn println(&self);
}
impl Println for str {
fn println(&self){
println!("{}",self)
}
}
fn main(){
let a="123";
let b=a.to_string();
a.println();
b.println();
}
why we need the |>
operator?
Why start a new thread about this when one is already ongoing? When will Rust adopt the syntax of pipline operator "|>" in ocaml - #7 by Finn
totally missed the other thread. Thank you
I'm going to go ahead and lock this topic.
If you want to continue discussing the pipeline operator, check out the other one.