Sha256: f8b0cf2af3f20f31ec1167e529267061c98ac11cb9c1c5e6bd32da1ef3e4ca16

Contents?: true

Size: 323 Bytes

Versions: 292

Compression:

Stored size: 323 Bytes

Contents

module SumOfMultiples exposing (..)


sumOfMultiples : List Int -> Int -> Int
sumOfMultiples multiples limit =
    List.sum (List.filter (inMultiples multiples) (List.range 1 (limit - 1)))


inMultiples : List Int -> Int -> Bool
inMultiples multiples candidate =
    List.any (\factor -> candidate % factor == 0) multiples

Version data entries

292 entries across 292 versions & 1 rubygems

Version Path
trackler-2.2.1.32 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.31 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.30 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.29 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.28 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.27 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.26 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.25 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.24 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.23 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.22 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.21 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.20 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.19 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.18 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.17 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.16 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.15 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.14 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.13 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm