defining a `function` macro and rewriting prelude to use it