Skip to content

Commit 505ffd3

Browse files
committed
WIP: Text: isSubsequenceOf: flip local fun
This way may have more stack reuse.
1 parent d4397a7 commit 505ffd3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Data/Text.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,14 +1891,14 @@ isSubsequenceOf tf sf
18911891
where
18921892
subseqOf :: Text -> Text -> Bool
18931893
subseqOf t s =
1894-
on f uncons s t
1894+
on f uncons t s
18951895
where
18961896
f :: Maybe (Char, Text) -> Maybe (Char, Text) -> Bool
1897-
f Nothing _ = True
1898-
f _ Nothing = False
1899-
f (Just (sc,ss)) (Just (tc,ts)) =
1897+
f _ Nothing = True
1898+
f Nothing _ = False
1899+
f (Just (tc,ts)) (Just (sc,ss)) =
19001900
subseqOf ts $
1901-
if sc == tc
1901+
if tc == sc
19021902
then s
19031903
else ss
19041904

0 commit comments

Comments
 (0)