All Projects → boostorg → Hof

boostorg / Hof

Licence: other
Higher-order functions for c++

Programming Languages

cpp
1120 projects
cplusplus
227 projects
cpp11
221 projects
cpp14
131 projects

Projects that are alternatives of or similar to Hof

Lambda
Fun with λ calculus!
Stars: ✭ 65 (-86.08%)
Mutual labels:  lambda, functional-programming, functional
Babel Plugin Partial Application
[DEPRECATED] Please use https://github.com/citycide/param.macro
Stars: ✭ 60 (-87.15%)
Mutual labels:  lambda, functional
Lambda
Functional patterns for Java
Stars: ✭ 737 (+57.82%)
Mutual labels:  lambda, functional-programming
Param.macro
Partial application syntax and lambda parameters for JavaScript, inspired by Scala's `_` & Kotlin's `it`
Stars: ✭ 170 (-63.6%)
Mutual labels:  lambda, functional
Deep Waters
🔥Deep Waters is an easy-to-compose functional validation system for javascript developers 🔥
Stars: ✭ 188 (-59.74%)
Mutual labels:  functional-programming, functional
Aioreactive
Async/await reactive tools for Python 3.9+
Stars: ✭ 215 (-53.96%)
Mutual labels:  functional-programming, functional
Sodium Typescript
Typescript/Javascript implementation of Sodium FRP (Functional Reactive Programming) library
Stars: ✭ 102 (-78.16%)
Mutual labels:  lambda, functional-programming
Redux Most
Most.js based middleware for Redux. Handle async actions with monadic streams & reactive programming.
Stars: ✭ 137 (-70.66%)
Mutual labels:  functional-programming, functional
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (-39.61%)
Mutual labels:  functional-programming, functional
Coconut
Simple, elegant, Pythonic functional programming.
Stars: ✭ 3,422 (+632.76%)
Mutual labels:  functional-programming, functional
Kotlin Result
A multiplatform Result monad for modelling success or failure operations.
Stars: ✭ 369 (-20.99%)
Mutual labels:  functional-programming, functional
Helios
A purely functional JSON library for Kotlin built on Λrrow
Stars: ✭ 157 (-66.38%)
Mutual labels:  functional-programming, functional
Rangeless
c++ LINQ -like library of higher-order functions for data manipulation
Stars: ✭ 148 (-68.31%)
Mutual labels:  functional-programming, functional
Phunctional
⚡️ λ PHP functional library focused on simplicity and performance
Stars: ✭ 243 (-47.97%)
Mutual labels:  functional-programming, functional
Sup
Composable, purely functional healthchecks in Scala.
Stars: ✭ 138 (-70.45%)
Mutual labels:  functional-programming, functional
Carp
Carp is a programming language designed to work well for interactive and performance sensitive use cases like games, sound synthesis and visualizations.
Stars: ✭ 4,389 (+839.83%)
Mutual labels:  functional-programming, functional
Forge
Functional style JSON parsing in Kotlin
Stars: ✭ 106 (-77.3%)
Mutual labels:  functional-programming, functional
Lambda Lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (-73.88%)
Mutual labels:  functional-programming, functional
java-modern-tech-practice
😎 Java™ modern tech practice sandbox ⏳
Stars: ✭ 43 (-90.79%)
Mutual labels:  functional, modern
Plam
An interpreter for learning and exploring pure λ-calculus
Stars: ✭ 385 (-17.56%)
Mutual labels:  lambda, functional-programming

Boost.Hof Travis status Appveyor status

About

HigherOrderFunctions is a header-only C++11/C++14 library that provides utilities for functions and function objects, which can solve many problems with much simpler constructs than whats traditionally been done with metaprogramming.

HigherOrderFunctions is:

  • Modern: HigherOrderFunctions takes advantages of modern C++11/C++14 features. It support both constexpr initialization and constexpr evaluation of functions. It takes advantage of type deduction, variadic templates, and perfect forwarding to provide a simple and modern interface.
  • Relevant: HigherOrderFunctions provides utilities for functions and does not try to implement a functional language in C++. As such, HigherOrderFunctions solves many problems relevant to C++ programmers, including initialization of function objects and lambdas, overloading with ordering, improved return type deduction, and much more.
  • Lightweight: HigherOrderFunctions builds simple lightweight abstraction on top of function objects. It does not require subscribing to an entire framework. Just use the parts you need.

HigherOrderFunctions is divided into three components:

  • Function Adaptors and Decorators: These enhance functions with additional capability.
  • Functions: These return functions that achieve a specific purpose.
  • Utilities: These are general utilities that are useful when defining or using functions

Github: https://github.com/boostorg/hof/

Documentation: http://boost-hof.readthedocs.io/

Motivation

  • Improve the expressiveness and capabilities of functions, including first-class citizens for function overload set, extension methods, infix operators and much more.
  • Simplify constructs in C++ that have generally required metaprogramming
  • Enable point-free style programming
  • Workaround the limitations of lambdas in C++14

Requirements

This requires a C++11 compiler. There are no third-party dependencies. This has been tested on clang 3.5-3.8, gcc 4.6-7, and Visual Studio 2015 and 2017.

Contexpr support

Both MSVC and gcc 4.6 have limited constexpr support due to many bugs in the implementation of constexpr. However, constexpr initialization of functions is supported when using the BOOST_HOF_STATIC_FUNCTION and BOOST_HOF_STATIC_LAMBDA_FUNCTION constructs.

Noexcept support

On older compilers such as gcc 4.6 and gcc 4.7, noexcept is not used due to many bugs in the implementation. Also, most compilers don't support deducing noexcept with member function pointers. Only newer versions of gcc(4.9 and later) support this.

Building

Boost.HigherOrderFunctions library uses cmake to build. To configure with cmake create a build directory, and run cmake:

mkdir build
cd build
cmake ..

Installing

To install the library just run the install target:

cmake --build . --target install

Tests

The tests can be built and run by using the check target:

cmake --build . --target check

The tests can also be ran using Boost.Build, just copy library to the boost source tree, and then:

cd test
b2

Documentation

The documentation is built using Sphinx. First, install the requirements needed for the documentation using pip:

pip install -r doc/requirements.txt

Then html documentation can be generated using sphinx-build:

sphinx-build -b html doc/ doc/html/

The final docs will be in the doc/html folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].