rabbitmq/erlando — pull request #8 by EduardSergeev (2012-05-17 08:17:07+00:00)
Title: 'do' block: add 'let' binding (via match expression)

Haskell `do` expression syntax allows `let` subexpressions (http://www.haskell.org/onlinereport/exps.html#sect3.14 or http://en.wikibooks.org/wiki/Haskell/do_Notation#Returning_values for example) which is sometimes very handy:
```haskell
f = do
x <- m1
let y = (x,x)
return (y,y)
```
I couldn't find similar feature in erlando's `do` (or did I miss it?), so I added one: match expressions in `do([])` are now handled in a similar fashion to Haskell's `let` expression:
```erlang
f() ->
do([monad ||
X <- m1(),
Y = {X,X},
return({Y,Y})]).
```
I added some tests. Seems to be working for me.