Sha256: 912f678980df8585b0b1be9ec0d298e059cb67ee014ba0e382c7a7e7b57285ba

Contents?: true

Size: 704 Bytes

Versions: 208

Compression:

Stored size: 704 Bytes

Contents

use "example.sml";

val test_cases = [
    ( ""      ,  ["enlists", "google", "inlets", "banana"], []         ),
    ( "listen",                                         [], []         ),
    ( "listen",  ["enlists", "google", "inlets", "banana"], ["inlets"] ),
    ( "hatreds", ["dearths","hardest","salmon","devilish", "threads"], ["dearths","hardest","threads"] )
];

fun run_tests [] = []
  | run_tests ((word,candidateList,expected)::ts) =
       (anagram word candidateList = expected) :: run_tests ts
                                                         
val allTestsPass = List.foldl (fn (x,y) => x andalso y) true (run_tests test_cases)                                                 

    

Version data entries

208 entries across 208 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.52 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.51 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.50 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.49 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.48 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.47 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.46 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.45 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.44 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.43 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.42 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.41 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.40 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.39 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.38 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.37 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.36 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.34 tracks/sml/exercises/anagram/test_anagram.sml
trackler-2.1.0.33 tracks/sml/exercises/anagram/test_anagram.sml