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.113 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.111 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.110 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.109 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.108 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.107 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.106 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.105 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.104 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.103 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.102 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.101 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.100 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.99 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.98 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.97 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.96 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.95 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.94 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm
trackler-2.2.1.93 tracks/elm/exercises/sum-of-multiples/SumOfMultiples.example.elm