@@ -381,8 +381,8 @@ All three are ways of capturing the environment on definition. However, the lexi
\begin{minted}{haskell}
elem x :: Eq a => a -> [a] -> Bool -- a is part of the Eq type class
\end{minted}
A type class is essentially an interface - if a type is part of a type class, it implements
the required behavior.\\
A type class is essentially an interface -- if a type is part of a type class, it implements
the required behavior.
You can also define your own types, including recursive types:
...
...
@@ -583,12 +583,13 @@ We don't need to specify the types of the map twice, since it is obvious from th
Higher-order functions are functions which either take in a function as an argument or return one, such as map and filter.
\subsection{Parameter Passing}
\subsubsection{Call-By-Value}
Call-by-value means that everything is copied upon entering a function.Languages such as Ruby, Java, etc do "pass-by-pointer", ie they are still pass-by-value, but the
Call-by-value means that everything is copied upon entering a function.
Languages such as Ruby, Java, etc do "pass-by-pointer", ie they are still pass-by-value, but the
value is a pointer. What this means is that if you pass in an array, you can edit it, but
changing the reference will not do anything.
\subsubsection{Call-by-reference}
Call-by-reference means we pass in a \textit{reference} to the object - so, it can be reassigned, edited, etc.
Call-by-reference means we pass in a \textit{reference} to the object -- so, it can be reassigned, edited, etc.
\subsubsection{Call-by-name}
Call-by-name is somewhat of an older concept. It means that we evaluate the object every time we reference it within the method. It can