<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Nov 29, 2010, at 10:30 PM, Ken Hegeland wrote:</div><div><br></div><div><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit; ">I've almost managed to create mc-solvable as the book wants it. I originally designed it to take a list of states, and I changed it to accept a list of states, list of(listof states), or a single state.</td></tr></tbody></table></blockquote><br></div><div>That's almost certainly a bad idea. &nbsp;A function that takes in any of several different types is often useful as a "front-end" function, or perhaps for a type with a special exceptional value (e.g. false), but for a function that actually does a lot of work, it'll only cause confusion. &nbsp;And it'll make your function longer, more complicated, and less efficient, as the first thing it has to do is figure out which of the three ways it was called this time. &nbsp;Decide what one type you want it to take in, and what one type you want it to return, and stick to those.</div></div><br><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>Stephen Bloch</div><div><a href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a></div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>