Miran Lipovaca is a computer science student in Ljubljana, Slovenia. His online tutorial, "Learn You a Haskell for Great Good!," is widely regarded as the best way to learn Haskell.
"_ means that we don't care what we'll draw from the list anyway so instead of writing a variable name that we'll never use, we just write _."
"Use tuples when you know in advance how many components some piece of data should have. Tuples are much more rigid because each different size of tuple is its own type, so you can't write a general function to append an element to a tuple — you'd have to write a function for appending to a pair, one"
"In our gcd' function, the logging is fast because the list appending ends up looking like this: a ++ (b ++ (c ++ (d ++ (e ++ f)))) Lists are a data structure that's constructed from left to right, and this is efficient because we first fully construct the left part of a list and only then add a long"
"Function application has the highest precedence of all the operations in Haskell. In other words, these two statements are equivalent."
"This example introduces Haskell’s if statement. You’re probably already familiar with if statements from other languages, but what makes Haskell’s unique is that the else part is mandatory. On the other hand, a Haskell program is a collection of functions. Func- tions are used to transform data valu"
"Accessing List Elements If you want to get an element of a list by index, use the !! operator. As with most programming languages, the indices start at 0:"
"multThree :: Int -> Int -> Int -> Int multThree x y z = x * y * z"