https://github.com/Silentsky0/jp-exercises/blob/59f7ad7c4addd569c7012c11873a1e23cedafe64/zad_30.hs#L77-L81