<br><div class="gmail_quote">On 12 May 2011 11:33, James Almond <span dir="ltr"><<a href="mailto:james@jamesalmond.com">james@jamesalmond.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
3) Our final solution used the each_cons Enumerable method, which I<br>
hadn't come across before.<br>
<br></blockquote><div><br></div><div>Oooh, I've not come across that before. *furiously shortens solution some more*</div><div><br></div><div>Which brings me to one of the things I think was really useful: the standard library, particularly Enumerable / Array / Hash, is full of neat methods.  It's definitely worth going back and reading over the docs for those to see what there is beyond #each, #map, and #inject.</div>
<div><br></div><div>I already knew this, but it's always worth repeating.  The one problem, in terms of shortest solution at least, is that often the method names are a tad long.</div><div><br></div><div>Muz</div></div>