Skip to content

Commit

Permalink
Дребни корекции
Browse files Browse the repository at this point in the history
  • Loading branch information
triffon committed Dec 20, 2023
1 parent c5968fc commit eb883e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 2.2-haskell_defs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

\title{Дефиниране на функции в Haskell}

\date{13--20 декември 2023 г.}
\date{13 декември 2023 г.}

\lstset{language=Haskell,style=Haskell}

Expand Down
4 changes: 2 additions & 2 deletions 2.3-haskell_lists.tex
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ \subsection{Отделяне на списъци}
\item \evalstop{[ 2 * x | x <- [1..5] ]}{[2,4,6,8,10]}
\item \evalstop{[ x^2 | x <- [1..10], odd x]}{[1,9,25,49,81]}
\item \lst{[ name | (name, \_, grade) <- students, grade >= 3 ]}
\item \lst{[ x^2 + y^2 | (x, y) <- vectors, x >= 0, y >= 0]}
\item \lst{[ x^2 + y^2 | (x, y) <- vectors, x >= 0, y >= 0 ]}
\item Ако имаме повече от един генератор, се генерират всички възможни комбинации от елементи (декартово произведение)
\item \evalstopnl{[ x++(' ':y) | x <- ["green", "blue"],y <- ["grass", "sky"]]}{["green grass", "green sky", "blue grass", "blue sky"]}
\item \evalstopnl{[ x++(' ':y) | x <- ["green", "blue"], y <- ["grass", "sky"]]}{["green grass", "green sky", "blue grass", "blue sky"]}
\item \evalstopnl{[ (x,y) | x <- [1,2,3], y <- [5,6,7], x + y <= 8 ]}{[(1,5),(1,6),(1,7),(2,5),(2,6),(3,5)]}
\item \textbf{Задача.} Да се генерират всички Питагорови тройки в даден интервал.
\end{itemize}
Expand Down

0 comments on commit eb883e7

Please sign in to comment.