File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
datastruct/elementary/queue Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 1- HEADER =
2- SOURCE = queue -en.tex
3- OBJECT = queue-en
1+ SRC = queue
2+ OBJ = $( SRC ) -en.pdf
3+ OBJ_CN = $( SRC ) -zh-cn.pdf
44TEX = xelatex
55
66.PHONY : all
77
8- all : pdf
8+ all : tex
9+ tex : $(OBJ )
910
1011cpp :
1112 $(MAKE ) cpp -C src
2223image :
2324 $(MAKE ) -C img
2425
25- pdf : image
26- $(TEX ) $(OBJECT )
27- $(TEX ) $(OBJECT )
28-
29- tex : pdf
30-
31- html : image
32- htlatex.bat $(OBJECT ) " html, imgdir:img/"
33- mv * .png img/
26+ % .pdf : % .tex image
27+ $(TEX ) $<
28+ $(TEX ) $<
3429
3530clean :
3631 rm -f * .aux * .dvi * .log * .out * .pdf * ~
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ \subsection{Singly linked-list solution}
163163class Queue q where
164164 empty :: q a
165165 isEmpty :: q a -> Bool
166- push :: q a -> a -> q a -- Or named as 'snoc', append, push_back
167- pop :: q a -> q a -- Or named as 'tail', pop_front
166+ push :: q a -> a -> q a -- Or named as 'snoc', append, push\_back
167+ pop :: q a -> q a -- Or named as 'tail', pop\_front
168168 front :: q a -> a -- Or named as 'head'
169169\end {lstlisting }
170170
@@ -1073,8 +1073,8 @@ \subsubsection{Sum up}
10731073\lstset {language=Haskell}
10741074\ begin{lstlisting}
10751075data State a = Empty
1076- | Reverse Int [a] [a] [a] [a] -- n, f', acc_f ' r, acc_r
1077- | Append Int [a] [a] -- n, rev_f ', acc
1076+ | Reverse Int [a] [a] [a] [a] -- n, f', acc\_f ' r, acc\_r
1077+ | Append Int [a] [a] -- n, rev\_f ', acc
10781078 | Done [a] -- result: f ++ reverse r
10791079\end {lstlisting }
10801080
You can’t perform that action at this time.
0 commit comments