yurtsiv / mooncake

🌜 A functional, dynamic programming language
MIT License
12 stars 4 forks source link

Pipeline operator #16

Open an-drian opened 3 years ago

an-drian commented 3 years ago

It would be nice to have pipeline operator, something like in Elixir or Elm.

Example:

let add = (x, y) do
  x + y
end

let multiply = (x, y) do
  x * y
end

let result = 5 |> add(5) |> multiply(5)
# expected output - 50 
yurtsiv commented 3 years ago

@an-drian Yeah, I like that. Thanks for the proposal!