Sha256: f21fc0d5482566e10f654cc4bcd1001772c2ae1e705311ae9d97a7ce93f92b6f

Contents?: true

Size: 569 Bytes

Versions: 66

Compression:

Stored size: 569 Bytes

Contents

module Raindrops exposing (raindrops)

import String


raindrops : Int -> String
raindrops number =
    let
        drops =
            [ if number % 3 == 0 then
                "Pling"
              else
                ""
            , if number % 5 == 0 then
                "Plang"
              else
                ""
            , if number % 7 == 0 then
                "Plong"
              else
                ""
            ]

        result =
            String.join "" drops
    in
    if result == "" then
        toString number
    else
        result

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.179 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.178 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.177 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.176 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.175 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.174 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.173 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.172 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.171 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.170 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.169 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.167 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.166 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.165 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.164 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.163 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.162 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.161 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.160 tracks/elm/exercises/raindrops/Raindrops.example.elm