Associative function application in Nix lang

In some languages (such as Ruby), function application is right associative:

def half x
  x / 2
end
half half half 16 # => 2

Whereas, function application in Nix is left associative. However, one can do this:

let
  makeAssociative = f: x: if builtins.isFunction x then makeAssociative (y: f (x y)) else f x;

  half = makeAssociative (x: x / 2);
in half half half 16 # => 2

With the pipe-operators experimental feature enabled, you could also write:

half <| half <| half 16

This has the advantage of being unambiguous for the reader.

Based on some prior discussions, it doesn’t seem like that operator is as likely to be kept as its “forward” counterpart.

16 |> half |> half |> half

(And I really wish <|and |> were more like function composition.)