Skip to content

Commit

Permalink
Добавяне на преамбюл за избягване на бъг с автоматичната компилация
Browse files Browse the repository at this point in the history
  • Loading branch information
triffon committed Dec 4, 2024
1 parent 7acffda commit 801e24b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions 1.4-scheme_lists.tex
Original file line number Diff line number Diff line change
Expand Up @@ -510,24 +510,24 @@ \section{Функции от по-висок ред за списъци}
\lst{(define (maximum l) (foldr max}\tt{ \alt<2>?{(car l)} l))}\\[2ex]
\pause\pause
Можем ли да пропуснем нулевата стойност за непразен списък?\\[2ex]
\begin{tabular}{ll}
\pause
$a_1 \oplus \big(\ldots \oplus (a_{n-1} \oplus a_n) \ldots\big)$
& \pause
\begin{lstlisting}
(define (foldr1 op l)
(if (null? (cdr l)) (car l)
(op (car l)
(foldr1 op (cdr l)))))
\end{lstlisting}\\[6ex]
\pause
$\big(\ldots\big((a_1 \oplus a_2) \oplus \ldots\big) \oplus a_n$
& \pause
\begin{lstlisting}
(define (foldl1 op l)
(foldl op (car l) (cdr l)))
\end{lstlisting}
\end{tabular}
% \begin{tabular}{ll}
% \pause
% $a_1 \oplus \big(\ldots \oplus (a_{n-1} \oplus a_n) \ldots\big)$
% & \pause
% \begin{lstlisting}
% (define (foldr1 op l)
% (if (null? (cdr l)) (car l)
% (op (car l)
% (foldr1 op (cdr l)))))
% \end{lstlisting}\\[6ex]
% \pause
% $\big(\ldots\big((a_1 \oplus a_2) \oplus \ldots\big) \oplus a_n$
% & \pause
% \begin{lstlisting}
% (define (foldl1 op l)
% (foldl op (car l) (cdr l)))
% \end{lstlisting}\\
% \end{tabular}
\end{frame}

\section{Вариадични функции}
Expand Down

0 comments on commit 801e24b

Please sign in to comment.