title: Obscure C syntax for Tomohiko Sakamoto's algorithm
body: <p>I stumbled upon this version of the Sakamoto algorithm</p>
  <pre><code>dow(m,d,y){y-=m&lt;3;return(y+y/4-y/100+y/400+&quot;-bed=pen+mad.&quot;[m]+d)%7;}
  </code></pre>
  <p>I tried it on ideone.com and it actually works. I'm not interested in how the algorithm works, it's the syntax that baffles me.</p>
  <p>I consider myself an intermediate C programmer and I have absolutely no idea what's going on in the <code>&quot;-bed=pen+mad.&quot;[m]</code> part of the code.</p>
  <p>What is that???</p>