title: Gatling - having a randomSwitch inside a repeat
body: <p>I am trying to get a randomSwitch to serve me a random function and I'd like to have that inside a .repeat so that I can iterate on that.</p>
  
  <p>Code example:</p>
  
  <pre><code>    val scn = scenario("myScenario").repeat(20) {
                                         randomSwitch(50.0 -&gt; function1,
                                                       50.0 -&gt; function2)
      }
  </code></pre>
  
  <p>The randomSwitch part is working on itself but when placed inside a repeat it's throwing:</p>
  
  <pre><code>found   : io.gatling.core.structure.ChainBuilder
  required: io.gatling.core.session.Expression[Int]
  </code></pre>
  
  <p>I would be grateful for any tips on how I could get this behavior to work even if in a different form.</p>