Entries:
Posts:

Something went wrong getting user information from Channel 9

Latest Achievement:

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Something went wrong getting the Visual Studio Achievements

# Cesar

Niner since 2009

• Erik,

It would be great if you can mention all the other books that you recomended during the series.  To Mock a Mockingbird was an excelent sugestion. Specially seeing how combinator that seem so abstract in the book can be used for equational reasoning. Thank for that suggestion.

• While these lectures are coming to an end we can all look forward to the C9 letures on F#. Charles any idea when that's comming?

• It has been a great journey learning about functional programming in Haskell. To bad I’m going to be out of the country (no internet) for the last lecture

• Just when I thought that this series couldn’t get better. Thanks Erick and Charles for putting so much effort into these lectures. Also, thanks to Dr. Hutton for taking the time to enlighten all of us.

• Thanks for this wonderful lecture.

As a side effect  , the lecture and the paper gave me a good enough refresher on derivatives that I was able to solve project Euler’s problem 262. http://projecteuler.net/index.php?section=problems&id=262

• These lectures have been the highlight of my Thursdays. .  Thanks for taking the time to produce them. I’m looking forward to see this lecture tonight.

• homework:

2) Extend the parser for arithmetic expressions to support substraction and
division, based upon the following extensions to the grammar:

expr ::= term (+ expr | - expr | e)
term ::= factor (* term | / term | e)

```expr' :: Parser Int expr' = do t <- term' do symbol "+" e <- expr' return (t + e) +++ do symbol "-" e <- expr' return (t - e) +++ return t term' :: Parser Int term' = do f <- factor' do symbol "*" t <- term' return (f * t) +++ do symbol
"/" e <- expr' return (f `div` e) +++ return f factor' :: Parser Int factor' = do symbol "(" e <- expr' symbol ")" return e +++ natural eval' :: String -> Int eval' xs = case parse expr' xs of [(n,[])] -> n [(_,out)] -> error ("unused input " ++ out) [] ->
error "invalid input" ```

• homework:

2) Express the comprehension [f x | x <- xs, p x] using the functions map and filter.

`mapfilter :: (a -> b) -> (a -> Bool) -> [a] -> [b] mapfilter f p = map f . filter p`

3) Redefine map f and filter p using foldr.

`map' :: (a -> b) -> [a] -> [b] map' f = foldr (\x v -> f x:v) [] filter' :: (a -> Bool) -> [a] -> [a] filter' p = foldr (\x v -> if p x then x:v else v) []`

• Excelent lecture as always. Keep up the good work.

In the book Hutton didn't explain why he chose List instead of the Maybe type. I'm glad you touch that subject in the lecture.

• Nice post Tom.

So much to learn.