We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a848cc0 commit c45f2afCopy full SHA for c45f2af
tests/lean/run/string_kmp.lean
@@ -5,8 +5,8 @@ inductive S where
5
| r (b e : Nat)
6
deriving Repr, BEq, DecidableEq
7
8
-def run [String.ToSlice α] [String.ToSlice β] (s : α) (pat : β) : List S :=
9
- String.Slice.Pattern.ForwardSliceSearcher.iter (String.ToSlice.toSlice s) (String.ToSlice.toSlice pat)
+def run (s pat : String) : List S :=
+ String.Slice.Pattern.ForwardSliceSearcher.iter s.toSlice pat.toSlice
10
|>.map (fun | .matched b e => S.m b.offset.byteIdx e.offset.byteIdx | .rejected b e => S.r b.offset.byteIdx e.offset.byteIdx)
11
|>.toList
12
0 commit comments