Multisplit: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: (Replaced one If with a `case ... of`)) |
m (→{{header|Haskell}}: (Pruned out a couple of redundant imports)) |
||
Line 676: | Line 676: | ||
Or as a fold: |
Or as a fold: |
||
<lang haskell> |
<lang haskell>import Data.List (find, isPrefixOf) |
||
multiSplit :: [String] -> String -> [(String, String, Int)] |
|||
multiSplit ds s = |
multiSplit ds s = |
||
let lng = length s |
let lng = length s |