Will Kurt currently works as a Data Scientist at Quick Sprout. With a formal background in both Computer Science (MS) and English Literature (BA) he is fascinated with explaining complex technical topics as clearly and generally as possible. He has taught a course section on Haskell at the University of Nevada, Reno and given workshops on Functional Programming. He also blogs about probability at CountBayesie.com.
"In most programming languages, variables are declared before they’re used. This convention in most programming languages is partially the byproduct of being able to change state. Variable order matters because you can always reassign the value of something after you’ve assigned it. In Haskell, becau"
"Listing 8.3 myCycle myCycle (first:rest) = first:myCycle (rest++[first]) Even with our rules as a guide, often recursion can cause quite a headache..."
"Q19.2 Write a version of map that works for Maybe types, called maybeMap."
"maybeMap :: (a -> b) -> Maybe a -> Maybe b maybeMap func Nothing = Nothing maybeMap func (Just val) = Just (func val)"
"There are two ways to use a language extension. The first is by using it when compiling with GHC. To do this, use the flag -X followed by the extension name. For a program named text.hs, this looks like the following: $ ghc text.hs -XOverloadedStrings This can also be used as an argument to GHCi, to"
"Functor’s <$> provides a common interface to apply any function to a value in a context. ... For IO, it’s essential to be able to change values in an IO context, because you can’t take IO values out of their context."
"You just wrote a pro- gram that handles missing values well, but not once did you have to check whether a value was null using conditionals, or worry about exception handling. Even better, you could write the core functionality of your program, haversine, as though nothing in the world might go wron"
"Listing 34.12 Your Main.hs file that uses your Palindrome.hs file"