Re: Pipe operator in Nim
In case you weren't aware you can indent . chaining in Nim like this too if you like: [https://play.nim-lang.org/#ix=2bRv](https://play.nim-lang.org/#ix=2bRv)
Re: Pipe operator in Nim
It's just a styling thingy. Having every step of the pipeline on a separate line with same indentation just looks cleaner. Thanks for your hint, though!
Re: Pipe operator in Nim
Hi Andreas, thanks for the clarification!
Re: Pipe operator in Nim
because of ufcs you can use . e.g a.echo
Re: Pipe operator in Nim
Well operators that are also used for line continuations have to be written like this: a |> b |> c Run
Re: Pipe operator in Nim
They are all single-line.
Re: Pipe operator in Nim
There are already several libraries for this in Github
Pipe operator in Nim
Is there any chance to get hold of the AST in a language construct where you define your own pipe operator as found e.g. in F#? (The point being that it should span multiple lines.) "Hello" |> echo Run It parses but it seems impossible to get access to the whole thing and manipulate it: dumpTree: "Hello" |> echo Run The result is: StmtList StrLit "Hello" Prefix Ident "|>" Ident "echo" Run