Skip to content

[ feature request ] Add the pipeline operator |> for chained method calls #1062

@yonas

Description

@yonas
❯ cat test.rhai
fn a(x) { x + " a" }

fn b(x) { x + " b" }

fn c(x) { x + " c" }

print(c(b(a("hello"))));

print (
    "hello"
    |> a
    |> b
    |> c
);

❯ rhai test.rhai
hello a b c
hello a b c

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions