## Pure Functions

Pure functions are quite similar to mathematical functions. They are the reason that Haskell is called a pure functional programming language.

Views: 25002

## Immutable Data

A key to purely functional languages is that their data are immutable. Therefore, assignments such as x= x+1 or ++x are not possible in the purely functional language Haskell. The consequence is that Haskell supports no loops like for, while, or until. They are based on the modification of a loop variable. Haskell does not modify existing data; Haskell creates new data when needed and reuses the old ones.

Tags: constexpr
Views: 21222

## Higher-Order Functions

Higher-order functions are the pendant to First-Class Functions because higher-order functions can take functions as an argument or return them as a result.

Views: 62427

## First-Class Functions

One of the characteristics of functional programming is first-class functions. First-class functions behave like data and are heavily used in the Standard Template Library.

Views: 30770

## The Definition of Functional Programming

The definition of functional programming is quite easy. Functional programming is programming with mathematical functions. Is that all? Of course, not!

Views: 55419

## Functional in C++17 and C++20

Which functional feature can we expect with C++17, for which functional feature can we hope for with C++20? This is exactly the question I will concisely answer in this post.

Tags: C++20, C++17
Views: 78975

## Functional in C++11 and C++14: Dispatch Table and Generic Lambdas

My favourite example the dispatch table shows how nice the features in modern C++ work together. A dispatch table is a table of pointers to functions. In my case, it is a table of handles to polymorphic function wrappers.

Tags: lambdas
Views: 66207

## Functional in TR1 and C++11

In this post, our journey through the functional features of classical, modern, and future C++ continues. Today, we stop in the present.

Tags: auto
Views: 22836

## Functional in C++98

C++ is not a functional programming language but you can program in a functional style. What are the functional features in C++? I will answer this question for C++98.

Views: 29281

## Object-Oriented, Generic, and Functional Programming

C++ is not a functional programming language. C++ has its roots in procedural and object-oriented programming. So it's quite surprising that programming in a functional style becomes more and more important in C++. That is not only true for C++. That holds also for python, which has a lot of functional features and even for Java. Now Java has lambda functions.

Views: 44395

### Subscribe to the newsletter (+ pdf bundle)

 Name Email Please enable the javascript to submit this form

### Visitors

Today 511

Yesterday 8036

Week 16726

Month 191436

All 7253726

Currently are 120 guests and no members online

• #### C++20: Module Interface Unit and Module Implementation Unit

Honestly, I did it with my first 100 posts but I ignored it with my last posts. I aske my daughter if ...

• #### Smart Tricks with Parameter Packs and Fold Expressions

Overload can be used with tuples, also. It is kind of a switch for data types if you squint. Use ...

• #### C++20: Module Interface Unit and Module Implementation Unit

You always end the article with "in my next post". Could you perhaps add a link or a button which say ...

• #### The First Big Update of My C++20 Book

Love your book. Just wondering if you have errata for the book?

• #### C++20: An Infinite Data Stream with Coroutines

FYI, final_suspend needs to be noexcept ;-)