<div dir="ltr"><div>Hi David,</div><div><br></div>David Thomas wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<a href="https://github.com/dlthomas/tzcache" target="_blank">https://github.com/dlthomas/tzcache</a><br>A small bit of code, but seems likely to be useful enough that I figured I should share.<br></blockquote><div><br></div>

<div>Thanks for sharing this!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1) Does this already exist somewhere I missed?<br></blockquote><div><br>

</div><div>I haven&#39;t seen it anywhere.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) It seems silly to make this its own library </blockquote>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> - any suggestions where it could be added?<br></blockquote><div><br></div><div>If you feel it is appropriate, I would be willing to add it</div>

<div>to timezone-olson. Does anyone else have an opinion</div><div>about it?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">3) Is the traverse-a-directory-and-populate-a-map </blockquote>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">pattern one worth abstracting?  If so, where should that go?<br></blockquote><div><br></div><div>I think the proper abstraction would be a more</div>

<div>general fold or traversal over a directory structure.</div><div>Some languages have something like that (e.g.,</div><div>os.walk in Python). But look how simply it worked</div><div>out for you in Haskell - perhaps that&#39;s why there</div>

<div>doesn&#39;t seem to be a standard function for this</div><div>anywhere. That said, it might be interesting to</div><div>have this as a lens-package-style traversal.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

4) Presently, it&#39;s a static cache entirely pre-loaded. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This seems fine, as it&#39;s not a terribly huge amount </blockquote>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">of data, but it&#39;s worth noting.<br></blockquote><div><br></div><div>Yes. The total amount of timezone data in the world</div>

<div>is likely to continue increasing at a significantly</div><div>slower rate than Moore&#39;s law.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

5) Any comments on the code generally? </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Improvements?  Complaints?<br></blockquote><div><br></div><div>I like your code. I&#39;m not sure how well this</div>

<div>brute-force mapM recursion would scale over</div><div>a timezone directory structure with, say, millions</div><div>of nodes. But that&#39;s not the use case here at all.</div><div><br></div><div>Thanks,</div><div>Yitz</div>

</div></div></div>