Sha256: 4267974409221acbf39cb189f42f045e5f52b4ad66094dbe57a98ff101184fbc

Contents?: true

Size: 221 Bytes

Versions: 384

Compression:

Stored size: 221 Bytes

Contents

fun convert (n: int): string =
  let
    fun f m s = if n mod m = 0 then s else ""
    val sound = String.concat [f 3 "Pling", f 5 "Plang", f 7 "Plong"]
  in
    if sound = ""
    then Int.toString n
    else sound
  end

Version data entries

384 entries across 384 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.158 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.157 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.156 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.155 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.154 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.153 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.152 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.151 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.150 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.149 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.148 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.147 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.146 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.145 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.144 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.143 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.142 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.141 tracks/sml/exercises/raindrops/example.sml
trackler-2.2.1.140 tracks/sml/exercises/raindrops/example.sml