title: Playing with the arrow (->)
body: <p>Here is the context :</p>
  
  <pre><code>data MonitoringCommand = ListCommandReceived
                         | ListCommandResponseReceived
                         | ListEventsGenerated
                         | ListValidationStateHistory
  
  
  runMonitoringCommand :: forall stepType. MonitoringCommand -&gt;
                                             Step stepType -&gt;
                                             ClientSetting -&gt;
                                             Workspace -&gt;
                                             Byline IO (Either StepError (Step stepType))
  runMonitoringCommand monitoringCommand currentStep settings Workspace {workspaceId} =
    displayCallResult currentStep (case monitoringCommand of
      ListCommandReceived -&gt; "Commands"  (streamGsdCommandByWorkspaceId settings workspaceId)
      ListCommandResponseReceived -&gt; "Command Responses" (streamGsdCommandResponseByWorkspaceId settings workspaceId)
      ListEventsGenerated -&gt; "Events" (streamGsdEventByWorkspaceId settings workspaceId)
      ListValidationStateHistory -&gt; "Validation State History" (streamGsdValidationStateByWorkspaceId settings workspaceId))
  
  
  displayCallResult :: forall item stepType. Show item =&gt;
                                               Step stepType -&gt;
                                               String -&gt;
                                               SerialT IO (SafeResponse (Persisted item)) -&gt;
                                               Byline IO (Either StepError (Step stepType))
  displayCallResult currentStep itemName clientCall = do
    displayBeginningOfACommand
    sayLn $ fg white &lt;&gt; (text . pack) itemName
    safeResponse &lt;- liftIO $ StreamlySafe.toList $ clientCall
    nextStep &lt;- case safeResponse of
        Left error -&gt; return $ Left $ StepError { currentStep, errorDescription = show error }
        Right persistedItems -&gt; persistedItems &amp; mapM (sayLn . displayItem) &gt;&gt; (return $ Right currentStep)
    displayEndOfACommand
    return nextStep
    where
      displayItem :: Show item =&gt; (Persisted item) -&gt; Stylized
      displayItem PersistedItem {offset, item} =
        fg white &lt;&gt; "  "&lt;&gt;(text.pack.show) offset &lt;&gt; "- " &lt;&gt; fg green &lt;&gt; (text.pack.show) item
  </code></pre>
  
  <p>in the function 'runMonitoringCommand',  I want somehow to add 2 parameters to (displayCallResult currentStep), can we do that ? </p>
  
  <p>instead of repeating the "displayCallResult currentStep" like this :</p>
  
  <pre><code>runMonitoringCommand :: forall stepType. MonitoringCommand -&gt;
                                             Step stepType -&gt;
                                             ClientSetting -&gt;
                                             Workspace -&gt;
                                             Byline IO (Either StepError (Step stepType))
  runMonitoringCommand monitoringCommand currentStep settings Workspace {workspaceId} =
    (case monitoringCommand of
      ListCommandReceived -&gt;         displayCallResult currentStep  "Commands"                 (streamGsdCommandByWorkspaceId settings workspaceId)
      ListCommandResponseReceived -&gt; displayCallResult currentStep  "Command Responses"        (streamGsdCommandResponseByWorkspaceId settings workspaceId)
      ListEventsGenerated -&gt;         displayCallResult currentStep  "Events"                   (streamGsdEventByWorkspaceId settings workspaceId)
      ListValidationStateHistory -&gt;  displayCallResult currentStep  "Validation State History" (streamGsdValidationStateByWorkspaceId settings workspaceId))
  </code></pre>