Evolution::Rails -> Ruby -> Haskell

NOTE: I have moved the blog to http://rubynations.blogspot.com. This post appears there in a more final form, with some updates based on feedback on reddit. To avoid further confusion, I have removed the text from the post here.

2 Responses to “Evolution::Rails -> Ruby -> Haskell”

  1. Just to point out that Haskell doesn’t actually disaprove of your local variables, in case anyone got that impression. In fact, the let-construct is designed to introduce exactly that. To give a contrived example, here’s a function in C++ and its translation to Haskell:

    int foo(int i) {
    int j, k;
    j = i * 5;
    k = pow(j,2);
    return k + 1;

    foo :: Int -> Int
    foo i =
    let j = i * 5
    k = j ^ 2
    in k + 1

  2. True, and thanks for pointing that out. I’ve moved the blog to http://rubynations.blogspot.com, and updated the article just a bit. I hope that it makes things a bit clearer.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: