Sha256: e49c50422f88940c3deda54feb1138c78ef35817e9f099cf771d6591184287da

Contents?: true

Size: 329 Bytes

Versions: 196

Compression:

Stored size: 329 Bytes

Contents

use "example.sml";
val test_cases = [
    ((Node [Leaf 1, Node [Leaf 2, Node [], Leaf 3, Node [Leaf 4, Leaf 5]]]), [1,2,3,4,5])
];

fun run_tests [] = []
  | run_tests ((input,expected)::ts) =
       (flatten input = expected) :: run_tests ts

val allTestsPass = List.foldl (fn (x,y) => x andalso y) true (run_tests test_cases);

Version data entries

196 entries across 196 versions & 1 rubygems

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