title: Implementing multiple if statements in OCaml
body: <p>So I am a little new to OCaml and I am trying to figure out a way for my function to check multiple conditions and modify a variable if any of those conditions are true</p>
  
  <p>rough pseudo code would be</p>
  
  <pre><code>var list = []
  if cond1 then 1::list
  if cond2 then 2::list
  etc
  </code></pre>
  
  <p>but from what I am able to tell once you enter an if statement you stay in it until it returns a value to the function. Is there a way around this limitation? Thanks for your time, tips or hints are greatly appreciated as I would love to understand the language</p>