Результаты работы

This commit is contained in:
2024-11-29 20:45:03 +03:00
parent 25a5646093
commit de4bfa4f84
4 changed files with 20 additions and 1 deletions

BIN
lab4/report/img/main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
lab4/report/img/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -282,6 +282,25 @@ main = do
\newpage \newpage
\section {Результаты работы программы} \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 \newpage
\section*{Заключение} \section*{Заключение}

View File

@@ -4,7 +4,7 @@ module Lib
) where ) where
isCongruent :: Int -> Int -> Int -> Bool 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] filterByPredicate :: (a -> Bool) -> [a] -> [a]