Page 2 of 2

Test if a string is a palindrome – a functional programming approach in Haskell

I could write this post by showing directly my solution and why it is efficient, but this is a kind of exposition that implies arrogance. Instead, I want to show you how functional reasoning allows you to write efficient programs…. Continue Reading →

Share Button

Functional programming – how to naturally construct basic functions. Part 1 – “until” function

When one meets for the first time functional programming, the first impression is that some higher order functions are too hard to cope with and to understand the basics is a little tricky. In this post I’ll show that is… Continue Reading →

Share Button

A little bit of recursion – the map function

One of the most useful things that you encounter all the time in programming is applying the same principle on every number in a sequence. For example, sometimes we have a list of numbers: [1,2,3] and we want to construct… Continue Reading →

Share Button

Towards general techniques in programming – the second diagonal principle

When we work with infinite lists in Haskell, one important problem is: Problem. Construct a list which generates all the distinct ordered pairs of natural numbers. So, we want a method to generate the set: {(0,0), (0,1),(0,2),…, (1,0), (1,1),(1,2),…} etc…. Continue Reading →

Share Button
Newer posts »

© 2017 — Powered by WordPress

Theme by Anders NorenUp ↑