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

Usunięta treść Dodana treść
m →‎go: nowy przykłąd
Linia 120:
main = loop 1000000
</source>
 
 
 
<source lang=haskell>
-- https://gist.github.com/niorad/45187d9eb76c585e573e
divideBy x y = go x y 0
where go a b count
| a < b = (count, a)
| otherwise = go (a - b) b (count + 1)
</source>
 
Zmienna count jest pomocniczym licznikiem
 
==Listy==