Jaro similarity: Difference between revisions
m
→{{header|Haskell}}: Comment positions tidied
m (→{{header|Haskell}}: white space and layout) |
m (→{{header|Haskell}}: Comment positions tidied) |
||
Line 1,079:
r = quot l2 2 - 1
in mapMaybe
(\(c, n)
->
let offset = max 0 (n - (r + 1))
-- Any offset for this char within range.
in elemIndex c (drop offset (take (n + r) ys)) >>=
|