Sha256: eb61e1a67eac7588e52754af043c217284b4ad824cb6b3d0c9132bdad988653a

Contents?: true

Size: 461 Bytes

Versions: 162

Compression:

Stored size: 461 Bytes

Contents

fun isPangram (input: string): bool =
  let
    val counter = Array.tabulate (26, fn _ => 0)
    val chars = map Char.toLower (String.explode input)
    val aCode = ord #"a"

    fun updateCounter c =
      let
        val index = ord c - aCode
      in
        if index < 0
        then ()
        else Array.update (counter, index, (Array.sub (counter, index)) + 1)
      end
  in
    List.app updateCounter chars;
    Array.all (fn x => x > 0) counter
  end

Version data entries

162 entries across 162 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.179 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.178 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.177 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.176 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.175 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.174 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.173 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.172 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.171 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.170 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.169 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.167 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.166 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.165 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.164 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.163 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.162 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.161 tracks/sml/exercises/pangram/example.sml
trackler-2.2.1.160 tracks/sml/exercises/pangram/example.sml