Two sum: Difference between revisions
→Returning all matches
(→Haskell Returning all matches: Dropped imports, simplified in terms of >>=, adjusted type signature) |
|||
Line 314:
====Returning all matches====
Listing multiple solutions (as zero-based indices) when they exist:
<lang haskell>sumTo :: Int -> [Int] -> [(Int, Int)]
|