Two sum: Difference between revisions

Content added Content deleted
Line 327: Line 327:


main :: IO ()
main :: IO ()
main = print $ sumTo 21 [0, 2, 11, 19, 90, 10]</lang>
main = mapM_ print $ sumTo 21 [0, 2, 11, 19, 90, 10]</lang>
{{Out}}
{{Out}}
<pre>[(1,3),(2,5)]</pre>
<pre>(1,3)
(2,5)</pre>


=={{header|Icon}} and {{header|Unicon}}==
=={{header|Icon}} and {{header|Unicon}}==