Two sum: Difference between revisions

Content added Content deleted
Line 314: Line 314:


====Returning all matches====
====Returning all matches====
Listing multiple solutions (as zero-based indices) when they exist:
Listing multiple solutions (as zero-based indices) where they exist:


<lang haskell>sumTo :: Int -> [Int] -> [(Int, Int)]
<lang haskell>sumTo :: Int -> [Int] -> [(Int, Int)]