On Wednesday, 26 June 2013 at 22:43:05 UTC, David wrote:
Am 26.06.2013 22:51, schrieb Gary Willoughby:Just for a bit of fun, I saw this question posted on reddit the otherday and wondered how *you* would solve this in D?http://stackoverflow.com/questions/731832/interview-question-ffn-nI solved it ;) http://dpaste.dzfl.pl/5cd56e9d
Let's keep it simple: int f(uint n) { return n; } uint f(int n) { return -n; }