Sha256: 3d68842f69b7145fa72b86eb045e0499eb579d0c9440083f98d0ffc334f085b2

Contents?: true

Size: 201 Bytes

Versions: 79

Compression:

Stored size: 201 Bytes

Contents

module SumOfMultiples

let sum numbers upperBound =
    let isMultiple x = numbers |> List.exists (fun y -> x % y = 0) 
    
    [1 .. upperBound - 1] 
    |> List.filter isMultiple 
    |> List.sum

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.179 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.178 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.177 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.176 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.175 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.174 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.173 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.172 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.171 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.170 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.169 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.167 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.166 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.165 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.164 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.163 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.162 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.161 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.160 tracks/fsharp/exercises/sum-of-multiples/Example.fs