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