Project Euler #5 (Smallest multiple) in Swift
In general, I like it; nice solution. Functions are well separated and I understood what it was doing right away, just from the function names.

You can get rid of one of your leastCommonMultiple functions (and make it more Swifty I think) by passing it a Range instead of an Array and by using reduce():

func greatestCommonDenominator(a: Int, b: Int) -&gt; Int {
    return b == 0 ? a : greatestCommonDenominator(b, a % b)
}

func leastCommonMultiple(range: Range&lt;Int&gt;) -&gt; Int {
    return reduce(range, 1) { (a, b) in a * (b / greatestCommonDenominator(a, b)) }
}

func solution5() {
    let answer = leastCommonMultiple(1...20)
    println(answer)
}


That change also seems to speed it up significantly. On my machine it changed the average run time from 0.0001 seconds to 0.00002 seconds; I believe that's simply from not having to create the Array though.