User Tools

Site Tools


codesnippets:scans

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
codesnippets:scans [2021/04/30 21:42] – created f2b216codesnippets:scans [2025/10/08 00:48] (current) – external edit 127.0.0.1
Line 6: Line 6:
 main = do main = do
     print $ scanl (\nAcc -> \(_, n) -> nAcc + n) (0 :: Integer) (zip "halleluja" [1..])     print $ scanl (\nAcc -> \(_, n) -> nAcc + n) (0 :: Integer) (zip "halleluja" [1..])
- 
 </code> </code>
 +    * executes, with output:<code>
 +[0,1,3,6,10,15,21,28,36,45]
 +</code>
 +
 +
 +===== ✎ =====
 +~~DISCUSSION~~
codesnippets/scans.1619811774.txt.gz · Last modified: (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki