summaryrefslogtreecommitdiff
path: root/src/search.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.sml')
-rw-r--r--src/search.sml8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/search.sml b/src/search.sml
index 563496fe..5e4e135f 100644
--- a/src/search.sml
+++ b/src/search.sml
@@ -70,4 +70,12 @@ fun bindP (r, f) =
((x', pos), acc'))
| Return x => Return x
+fun bindPWithPos (r, f) =
+ case r of
+ Continue ((x, pos), acc) =>
+ map (f (x, pos) acc,
+ fn (x', acc') =>
+ ((x', pos), acc'))
+ | Return x => Return x
+
end