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.0.5.13 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.12 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.11 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.10 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.9 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.8 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.7 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.6 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.5 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.4 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.3 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.0.5.2 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm