It's not backwards. The text is linear, but the code isn't. It's outer most nested function to the innermost nested function.
Makes most sense if you think of HTML
<html> <body> <div> </div> </body> </html>
would compose as
compose( html, body, div )