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.2.1.180 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.179 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.178 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.177 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.176 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.175 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.174 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.173 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.172 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.171 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.170 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.169 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.167 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.166 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.165 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.164 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.163 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.162 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.161 tracks/fsharp/exercises/raindrops/Example.fs
trackler-2.2.1.160 tracks/fsharp/exercises/raindrops/Example.fs