Haskell

Facebook Twitter

Mike's World-O-Programming - Yet Another Monad Tutorial (part 1: basics) It's a standing joke in the Haskell community that every Haskell programmer, as part of his or her learning process, will eventually write one or more monad tutorials.

Mike's World-O-Programming - Yet Another Monad Tutorial (part 1: basics)

I'm certainly no exception. But since I know that there are already dozens of monad tutorials out there, some quite good, why on earth would I want to write Yet Another One? There are two reasons: I think I can explain some aspects of monads better than most of the monad tutorials I've seen.My own understanding of monads has improved greatly, and I'd like to try to pass that on if I can. Prerequisites Since I will be using the programming language Haskell in my examples, it would be very helpful if you, the reader, know Haskell up to and including polymorphic types and type classes.

Why Do Monads Matter? « Sententia cdsmithus. (A Side Note: I’ve been formulating the final thoughts on this post for about a week now.

Why Do Monads Matter? « Sententia cdsmithus

In an entirely unrelated coincidence, a good friend of mine and fellow Haskell programmer, Doug Beardsley, ended up writing two posts about monads over the weekend as well. Weird! But don’t fret; this isn’t really the same thing at all. I’m not writing to teach Haskell programmers how to use monads. I’m writing about a kind of intuition about why these concepts turn out to matter in the first place. Category Theory for Software Development?

Match made in heaven? If you’re a software developer, have you heard about monads and wondered what they were? Or if you’re interested in mathematics, have you heard murmurs in the past about how category theory interests computer science people? These are the kinds of questions I begin with. Learn Haskell Fast and Hard. Tl;dr: A very short and dense tutorial for learning Haskell.

Learn Haskell Fast and Hard

Thanks to Oleg Taykalo you can find a Russian translation here: Part 1 & Part 2 ; Table of Content I really believe all developers should learn Haskell. I don’t think everyone needs to be super Haskell ninjas, but they should at least discover what Haskell has to offer. Haskell - A monad is just a monoid in the category of endofunctors, what's the problem. Chapter 2. Types and Functions. Chapter 2.

Chapter 2. Types and Functions

Types and Functions Every expression and function in Haskell has a type. For example, the value True has the type Bool, while the value "foo" has the type String. The type of a value indicates that it shares certain properties with other values of the same type. For example, we can add numbers, and we can concatenate lists; these are properties of those types. Before we launch into a deeper discussion of Haskell's type system, let's talk about why we should care about types at all: what are they even for? The benefit of introducing abstraction is that it lets us forget or ignore low-level details. What makes type systems interesting is that they're not all equal. Haskell's type system allows us to think at a very abstract level: it permits us to write concise, powerful programs. Category Theory.

Combinations and Permutations. What's the Difference?

Combinations and Permutations

In English we use the word "combination" loosely, without thinking if the order of things is important. In other words: So, in Mathematics we use more precise language: In other words: A Permutation is an ordered Combination. Permutations There are basically two types of permutation: Repetition is Allowed: such as the lock above. 1. These are the easiest to calculate. When we have n things to choose from ... we have n choices each time! When choosing r of them, the permutations are: n × n × ... (In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.)

Haskell/Category theory. This article attempts to give an overview of category theory, in so far as it applies to Haskell.

Haskell/Category theory

To this end, Haskell code will be given alongside the mathematical definitions. Absolute rigour is not followed; in its place, we seek to give the reader an intuitive feel for what the concepts of category theory are and how they relate to Haskell. Introduction to categories[edit] A simple category, with three objects A, B and C, three identity morphisms and , and two other morphisms . A category is, in essence, a simple collection. A collection of objects.A collection of morphisms, each of which ties two objects (a source object and a target object) together. Lots of things form categories. Parsec. This article is a stub.

Parsec

You can help by expanding it. 1 Introduction Parsec is an industrial strength, monadic parser combinator library for Haskell. It can parse context-sensitive, infinite look-ahead grammars but it performs best on predictive (LL[1]) grammars. The latest stable release with Haddock documentation is available on Hackage and development versions are available via the Darcs repository. 2 Usage Parsec lets you construct parsers by combining higher-order Combinators to create larger expressions.