January 2011
3 posts
7 tags
Jan 29th
73 notes
5 tags
Ruby Koans FTW
Just started learning Ruby… killing it! def triangle(a, b, c) s = [a,b,c].sort equal = [(a==b), (b==c), (c==a)] fail TriangleError if s[0] + s[1] <= s[2] return :equilateral if equal.all? equal.any? ? :isosceles : :scalene end
Jan 12th
10 notes
3 tags
Jan 7th
432 notes