Emulating the pipe operator in javascript in a readable way
It works by using the output of each of the functions as the first argument to the next function. The given args are bound to the second argument and up. 


Just running by this description, one could easily create a piping operation with 2 helper functions:

const bind = (fn, ...boundArgs) =&gt; callArg =&gt; fn(callArg, ...boundArgs)
const pipe = (...fns) =&gt; initialArg =&gt; fns.reduce((r, fn) =&gt; fn(r), initialArg)

pipe(
  bind(put_session, current_user, user),
  bind(put_resp_header, location, '/'),
  bind(put_resp_content_type, 'text/html'),
  bind(send_resp, 302, 'You are being redirected')
)(conn)


bind accepts a function and bound arguments and returns a function that accepts a single argument. When this returned function is called, it calls the bound function with the call argument first, followed by the rest of the bound arguments.

pipe accepts a list of bound functions, and calls them one by one. The first function gets the call argument, while the remaining functions gets the return value of the previously called functions.

This approach effectively copies over the lodash signature, but does not require lodash. It also doesn't deal with this. You get the conciseness of your second example, and less of the bloat on your third example.