title: Is it better to use the State monad, or to pass state recursively?
body: <p>I'm just learning Haskell, and trying to figure out the most idiomatic way to implement a line of sight algorithm.</p>
  
  <p>The demo code I found uses the state monad, but it seem simpler to me (I'm just a beginner) to pass state recursively.  What am I missing here?  Are there performance problems?</p>
  
  <p>Find code at: <a href="http://www.finalcog.com/bresenham-algorithm-idiomatic-haskell" rel="noreferrer">http://www.finalcog.com/bresenham-algorithm-idiomatic-haskell</a></p>
  
  <p>Thanks,</p>
  
  <p>Chris.</p>