Pipe Operator

Noun · Development

Definitions

  1. A language operator (|> in Elixir, F#, and others) that passes the result of the left expression as the first argument to the function on the right. Enables readable, left-to-right data transformation chains instead of deeply nested function calls.

    In plain English: A special symbol that lets you write code as a chain of steps reading left to right, instead of nesting functions inside each other like Russian dolls.

    Example: "data |> filter(active) |> sort(by: :name) |> take(10) reads like a recipe instead of sort(filter(data, active), by: :name)."

Related Terms