Jump to content

Two sum: Difference between revisions

(→‎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)]
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.