Programowanie w systemie UNIX/Haskell: Różnice pomiędzy wersjami

m
m (→‎cycle: opis)
 
|}
===pętle===
====go====
 
<source lang=haskell>
-- https://stackoverflow.com/questions/5926033/haskell-efficient-equivalent-of-for-loop
import System.IO
 
loop :: Int -> IO ()
loop n = go n
where
go n | n <= 0 = return ()
go n = go (n-1)
 
main = loop 1000000
</source>
 
==Listy==
6796

edycji