Giter Club home page Giter Club logo

haskell's Introduction

haskell

Programming in Haskell by Graham Hutton exercises

I started from chapter 4. Thought earlier exercises too basic to bother with publishing.

To feel a bit like a diary I have noted where I faltered or made a wrong decision to show the decision making process in getting to a final solution.

This book is an excellent introduction to Haskell. Yes there are some very good free online resources such as LYAH, and I did start there but I didn't like just reading. I wanted to be exercised along the way to check my understanding. This book has exercises at the end of each section which so far seem set at the right sort of level. They may require a little thought and time in places but generally most readers should be able to come up with some sort of an answer.

One point to note is the book uses the n + k concept which has been dumped now because it is deemed not really necessary and can cause confusion.

n + k is this:

drop :: Int -> [a] -> [a] drop 0 xs = xs drop (n + 1) [] = [] drop (n + 1) (_:xs) = drop n xs

But it is pretty pointless and you can easily convert to this:

drop :: Int -> [a] -> [a] drop 0 xs = xs drop n [] = [] drop n (_:xs) = drop (n - 1) xs

So don't get too hung up about that. You can mentally convert as per example above.

Apart from that tiny issue (which is fair enough because at the time it was probably seen as a useful feature) the book is excellent as a first step into learning the language.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.