diff --git a/lab4/report/img/main.png b/lab4/report/img/main.png new file mode 100644 index 0000000..2b748f2 Binary files /dev/null and b/lab4/report/img/main.png differ diff --git a/lab4/report/img/test.png b/lab4/report/img/test.png new file mode 100644 index 0000000..9a155b9 Binary files /dev/null and b/lab4/report/img/test.png differ diff --git a/lab4/report/report.tex b/lab4/report/report.tex index 774409e..45d2870 100644 --- a/lab4/report/report.tex +++ b/lab4/report/report.tex @@ -282,6 +282,25 @@ main = do \newpage \section {Результаты работы программы} + \begin{figure}[h!] + \centering + \includegraphics[width=0.6\linewidth]{img/main.png} + \caption{Результаты работы программы.} + \label{fig:main} + \end{figure} + + Сама программа лишь выводит примеры работы функций \texttt{isCongruent} и \texttt{filterByPredicate}. Результаты её запуска представлены на Рис.~\ref{fig:main}. + + \begin{figure}[h!] + \centering + \includegraphics[width=0.6\linewidth]{img/test.png} + \caption{Результаты запуска тестов.} + \label{fig:test} + \end{figure} + + Результаты запуска тестов с помощью команды \texttt{stack test} представлены на Рис.~\ref{fig:test}. + + \newpage \section*{Заключение} diff --git a/lab4/src/Lib.hs b/lab4/src/Lib.hs index 5c91057..7c78342 100644 --- a/lab4/src/Lib.hs +++ b/lab4/src/Lib.hs @@ -4,7 +4,7 @@ module Lib ) where isCongruent :: Int -> Int -> Int -> Bool -isCongruent a b d = a `mod` d == b `mod` d +isCongruent a b d = a `mod` d + 1 == b `mod` d filterByPredicate :: (a -> Bool) -> [a] -> [a]