the following snippet of code throws a ReferenceError: selectTen is not defined
    var select = _.pipe(
      selectTen,
      fetchUrls,
      awaitUrlData,
      connectToLoad
    )
    var selectTen = _.partialRight(selectItems, [4]) 
    var connectToLoad = _.partialRight(connect, [load]);  
While the following snippet runs perfectly fine:
   var selectTen = _.partialRight(selectItems, [4]) 
   var connectToLoad = _.partialRight(connect, [load]);  
    var select = _.pipe(
      selectTen,
      fetchUrls,
      awaitUrlData,
      connectToLoad
    )
I am running this code as part of an angularjs project using vanilla (ES5) JavaScript where .js files are being included in tags in index.html. No module loader is being used
the _. notation is part of lodash' functional programming library. Suffice to say that they return functions and could be replaced with function(param){...}.
Why are the selectTen and connectToLoad functions not being hosted in the first snippet?
 
     
    