Tags » Haskell

Object Oriented Haskell

You may recall, earlier this year I wrote about object orientation in C. The basic Idea being that “Object Oriented Programming” is more a mindset, then a language feature. 1,072 more words


Chapter 6: Higher Order Functions

Learn You a Haskell for Great Good!

Curried functions

  • Every function in Haskell officially only takes one parameter
  • If we call a function with too few parameters, we get back a partially applied function (the return ->)
  • 1,218 more words

Homework 01

UPenn CIS 194 Spring 2013

Homework 1

The problem statement is here. The interesting problem is the classic Tower of Hanoi puzzle. Using Haskell, this problem was reduce to very compact representation of the recursive logic itself: 67 more words


Problem 08

99 Haskell Problems

Problem 8

(**) Eliminate consecutive duplicates of list elements.

If a list contains repeated elements they should be replaced with a single copy of the element. 55 more words


Problem 07

99 Haskell Problems

Problem 7

(**) Flatten a nested list structure.

Transform a list, possibly holding lists as elements into a `flat’ list by replacing each list with its elements (recursively). 79 more words


Problem 06

99 Haskell Problems

Problem 6

(*) Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. (x a m a x). 22 more words