Assume we have a proc like this (it doesn't do anything sensible): 
    
    
    proc coolProc[T](x: openArray[T]): T =
      when x.len == 1:
        echo "Nothing to see! Move on!"
      else:
        echo "How have you gotten " & x.len & "gold coins already?!"
    
    
    Run

Let's say I call it using this code: 
    
    
    coolProc(@[0])
    coolProc(@[0, 1, 2])
    
    
    Run

Is there multiple versions of coolProc created for all the "when-scenarios" or 
is there just one (if we ignore that it's generic)? In other words, would this 
code give me the expected results? 

Reply via email to