equal
deleted
inserted
replaced
1226 |
1226 |
1227 |
1227 |
1228 |
1228 |
1229 (** misc **) |
1229 (** misc **) |
1230 |
1230 |
|
1231 (* decompose the "problem" x into a list of subproblems ys and a recombination *) |
|
1232 (* function recomb, solve the subproblems recursively, use recomb to combine *) |
|
1233 (* the recursive solutions for ys into an overall "solution" for x *) |
1231 fun divide_and_conquer decomp x = |
1234 fun divide_and_conquer decomp x = |
1232 let val (ys, recomb) = decomp x |
1235 let val (ys, recomb) = decomp x |
1233 in recomb (map (divide_and_conquer decomp) ys) end; |
1236 in recomb (map (divide_and_conquer decomp) ys) end; |
1234 |
1237 |
1235 |
1238 |