\babel@toc {english}{} \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \contentsline {listing}{\numberline {1.1}{\ignorespaces Quicksort implementation in Haskell\relax }}{5}{listing.caption.5}% \contentsline {listing}{\numberline {1.2}{\ignorespaces Go web server handler function\relax }}{7}{listing.caption.6}% \contentsline {listing}{\numberline {1.3}{\ignorespaces Constructor with functional options\relax }}{8}{listing.caption.7}% \contentsline {listing}{\numberline {1.4}{\ignorespaces Example for a functional option\relax }}{8}{listing.caption.8}% \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \contentsline {listing}{\numberline {3.1}{\ignorespaces Example usage for map and fmap\relax }}{20}{listing.caption.10}% \contentsline {listing}{\numberline {3.2}{\ignorespaces Example usage of map in Go\relax }}{21}{listing.caption.11}% \contentsline {listing}{\numberline {3.3}{\ignorespaces Example usage of prepend in go\relax }}{22}{listing.caption.13}% \contentsline {listing}{\numberline {3.4}{\ignorespaces Function headers of the fold functions\relax }}{23}{listing.caption.14}% \contentsline {listing}{\numberline {3.5}{\ignorespaces foldr and foldl execution order\relax }}{23}{listing.caption.16}% \contentsline {listing}{\numberline {3.6}{\ignorespaces Example usage of foldr and foldl in go\relax }}{24}{listing.caption.17}% \contentsline {listing}{\numberline {3.7}{\ignorespaces Example usage of filter in Go\relax }}{25}{listing.caption.18}% \contentsline {listing}{\numberline {3.8}{\ignorespaces Go Variable Declarations\relax }}{30}{listing.caption.19}% \contentsline {listing}{\numberline {3.9}{\ignorespaces Go Assignment Operators\relax }}{31}{listing.caption.20}% \contentsline {listing}{\numberline {3.10}{\ignorespaces Go scoping issue with recursive functions\relax }}{32}{listing.caption.22}% \contentsline {listing}{\numberline {3.11}{\ignorespaces Fixing the scope issue on recursive functions\relax }}{32}{listing.caption.23}% \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \contentsline {listing}{\numberline {4.1}{\ignorespaces Godoc for the new built-in functions\autocite {new-builtins-godoc}\relax }}{37}{listing.caption.27}% \contentsline {listing}{\numberline {4.2}{\ignorespaces Registering new built-in functions\autocite {new-builtins-universe}\relax }}{38}{listing.caption.28}% \contentsline {listing}{\numberline {4.3}{\ignorespaces fmap implementation in Go\relax }}{40}{listing.caption.30}% \contentsline {listing}{\numberline {4.4}{\ignorespaces Improved implementation of fmap\relax }}{40}{listing.caption.31}% \contentsline {listing}{\numberline {4.5}{\ignorespaces fmap AST translation\autocite {fmap-walk-implementation}\relax }}{41}{listing.caption.32}% \contentsline {listing}{\numberline {4.6}{\ignorespaces prepend implementation in Go\relax }}{41}{listing.caption.34}% \contentsline {listing}{\numberline {4.7}{\ignorespaces prepend AST translation\autocite {prepend-walk-implementation}\relax }}{42}{listing.caption.35}% \contentsline {listing}{\numberline {4.8}{\ignorespaces fold implementation in Go\relax }}{42}{listing.caption.37}% \contentsline {listing}{\numberline {4.9}{\ignorespaces fold AST translation\autocite {fold-walk-implementation}\relax }}{43}{listing.caption.38}% \contentsline {listing}{\numberline {4.10}{\ignorespaces filter implementation in Go\relax }}{43}{listing.caption.40}% \contentsline {listing}{\numberline {4.11}{\ignorespaces filter AST translation\autocite {filter-walk-implementation}\relax }}{44}{listing.caption.41}% \contentsline {listing}{\numberline {4.12}{\ignorespaces Illustrating the difference between Go code and it's AST code\relax }}{45}{listing.caption.43}% \contentsline {listing}{\numberline {4.13}{\ignorespaces Handling the basic AST types in funcheck\autocite {funcheck-ast-types}\relax }}{49}{listing.caption.44}% \contentsline {listing}{\numberline {4.14}{\ignorespaces Illustration of an assignment node and corresponding positions\autocite {ast-positions}\relax }}{50}{listing.caption.45}% \contentsline {listing}{\numberline {4.15}{\ignorespaces Illustration of a function literal assignment\autocite {ast-positions}\relax }}{51}{listing.caption.46}% \contentsline {listing}{\numberline {4.16}{\ignorespaces Testing a code analyser with the `analysistest' package\relax }}{52}{listing.caption.47}% \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \contentsline {listing}{\numberline {5.1}{\ignorespaces Demonstration of the new built-in functions\relax }}{54}{listing.caption.48}% \contentsline {listing}{\numberline {5.2}{\ignorespaces Pretty-printing declarations in idiomatic Go\relax }}{56}{listing.caption.49}% \contentsline {listing}{\numberline {5.3}{\ignorespaces Pretty-printing declarations in functional Go\relax }}{57}{listing.caption.50}% \contentsline {listing}{\numberline {5.4}{\ignorespaces Quicksort implementations compared\relax }}{58}{listing.caption.51}% \contentsline {listing}{\numberline {5.5}{\ignorespaces Comparison Java Streams and functional Go\relax }}{59}{listing.caption.52}% \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \addvspace {10\p@ } \contentsline {listing}{\numberline {1}{\ignorespaces Functional Options for a simple web server\relax }}{81}{listing.caption.61}% \contentsline {listing}{\numberline {2}{\ignorespaces Example on how to mutate data in Go\relax }}{83}{listing.caption.62}% \contentsline {listing}{\numberline {3}{\ignorespaces Example on how shadowing works on block scopes\relax }}{84}{listing.caption.63}% \contentsline {listing}{\numberline {4}{\ignorespaces foldl and foldl' strictness\autocite {fold-types}\relax }}{85}{listing.caption.64}% \contentsline {listing}{\numberline {5}{\ignorespaces Working around the missing foldl implementation in Go\relax }}{86}{listing.caption.65}% \contentsline {listing}{\numberline {6}{\ignorespaces The original prettyprint implementation\autocite {prettyprint-orig}\relax }}{90}{listing.caption.66}% \contentsline {listing}{\numberline {7}{\ignorespaces The refactored, functional prettyprint implementation\autocite {prettyprint-functional}\relax }}{92}{listing.caption.67}% \contentsline {listing}{\numberline {8}{\ignorespaces Demonstration of how sum types can be imitated with interfaces\relax }}{93}{listing.caption.68}%