Sha256: b926fe2a2756c286510ea3c0b4c78612470a39261c648a3f9b314bb8b68f8ee4

Contents?: true

Size: 578 Bytes

Versions: 322

Compression:

Stored size: 578 Bytes

Contents

module Raindrops exposing (..)

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

322 entries across 322 versions & 1 rubygems

Version Path
trackler-2.2.1.44 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.43 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.42 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.41 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.40 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.39 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.38 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.37 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.36 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.35 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.34 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.33 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.32 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.31 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.30 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.29 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.28 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.27 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.26 tracks/elm/exercises/raindrops/Raindrops.example.elm
trackler-2.2.1.25 tracks/elm/exercises/raindrops/Raindrops.example.elm