1
0
Fork 0
haskell-lectures/VL2/content/VL2_rec_patterns12.tex

5 Zeilen
522 B
TeX

\begin{itemizep}
\item if you find recurring patterns in your code, abstract them out! Experienced Haskellers avoid explicit recursion, unless the recursion pattern is so complex/specific that an abstraction doesn't make sense.
\item map, filter, fold etc are all dependent on the data type (here: lists). For new data types (e.g. a tree) you can and will write your own recursion abstractions
\item although these functions are so fundamental that they are already implemented for most data types out there
\end{itemizep}