File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,26 @@ foreign import match
2323 \ };\
2424 \}" :: Regex -> String -> [String ]
2525
26- foreign import replaceR
27- " function replaceR (r) {\
26+ foreign import replace
27+ " function replace (r) {\
2828 \ return function(s1) {\
2929 \ return function(s2) {\
3030 \ return s2.replace(r, s1);\
3131 \ };\
3232 \ };\
3333 \}" :: Regex -> String -> String -> String
3434
35+ foreign import replace'
36+ " function replace$prime(r) {\
37+ \ return function(f) {\
38+ \ return function(s2) {\
39+ \ return s2.replace(r, function (match) {\
40+ \ return f(match)(Array.prototype.splice.call(arguments, 1, arguments.length - 3));\
41+ \ });\
42+ \ };\
43+ \ };\
44+ \}" :: Regex -> (String -> [String ] -> String ) -> String -> String
45+
3546foreign import search
3647 " function search(r) {\
3748 \ return function (s) {\
You can’t perform that action at this time.
0 commit comments