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.159 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.158 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.157 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.156 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.155 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.154 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.153 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.152 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.151 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.150 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.149 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.148 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.147 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.146 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.145 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.144 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.143 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.142 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.141 tracks/fsharp/exercises/sum-of-multiples/Example.fs
trackler-2.2.1.140 tracks/fsharp/exercises/sum-of-multiples/Example.fs