Determine if a string has all unique characters: Difference between revisions
Content added Content deleted
Line 454: | Line 454: | ||
go [] = Nothing |
go [] = Nothing |
||
go [_] = Nothing |
go [_] = Nothing |
||
go ((c, i): |
go ((c, i):cs) = |
||
maybe (go |
maybe (go cs) (\(x, j) -> Just (x, [i, j])) (find ((c ==) . fst) cs) |
||