Skip to content
This repository has been archived by the owner on Jan 2, 2022. It is now read-only.

Latest commit

 

History

History
31 lines (21 loc) · 886 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 886 Bytes

λ

lambda is a functional library for C++

Build Status

Usage

using namespace lambda;

let multipleOf = curry(flip([](auto x, auto y) { return x % y == 0; }));
let even = multipleOf(2);

// ...

using namespace lambda::streams;

// Find the sum of all the multiples of 3 or 5 below 1000.
ints(0, 1000) | filter(multipleOf(3) || multipleOf(5)) | sum;

About

lambda brings the power of currying and other functional paradigms to C++, in a simple library. The goal: making functional programming in C++ straight-forward and intuitive.

Features

  • currying
  • function composition
  • partial application (simplified functional bind)
  • streams