Sha256: 2d959c05e9d46e34afb06b7f304a3e1d032ab7a00dc5859c09dd1624803784c3

Contents?: true

Size: 362 Bytes

Versions: 396

Compression:

Stored size: 362 Bytes

Contents

module Raindrops

open System
open System.Globalization

let convert (number:int) =
    let factors = [(3, "Pling"); (5, "Plang"); (7, "Plong")]
    let factorStrings = [for (factor, str) in factors do if number % factor = 0 then yield str]
    match factorStrings with
    | [] -> number.ToString(CultureInfo.InvariantCulture)
    | xs -> String.concat "" xs

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.0.0.5 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.0.0.4 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.0.0.3 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.0.0.2 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.0.0.1 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.0.0.0 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.4.1 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.4.0 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.3.0 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.2.1 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.2.0 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.1.2 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.1.1 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.1.0 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.0.1 tracks/fsharp/exercises/raindrops/Example.fs
trackler-1.0.0 tracks/fsharp/exercises/raindrops/Example.fs