GithubHelp home page GithubHelp logo

nextgenintelligence / cat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awgn/cat

0.0 2.0 0.0 429 KB

C++14 functional library

Home Page: http://cat.github.io

C++ 99.69% CMake 0.30% Shell 0.01%

cat's Introduction

Cat: C++14 functional library

What is cat?

Cat is a C++14 functional library inspired by category theory and the Haskell language. The purpose of cat is to provide utility functions and type classes to enable the functional programming paradigm in C++.

Rationale

The purpose of the Cat library is twofold:

  • it provides utility classes and functions that enable the functional programming paradigm in C++.
  • it implements an extensible framework of type classes to attain a better reusability of code through the principles of category theory.

Features

The Cat library:

  • is lightweight. Each function and object shipped with the library takes advantage of modern C++ features, such as constexpr constructs, movability, perfect forwarding, etc.

  • is written in portable C++14 without using macro black-magic, whereas template meta-programming is limited only to the implementation of type traits.

  • extends the standard type traits with a set specifically tailored to generic and functional programming (e.g. is_container, is_associative_container, function_type, function_arity, return_type, is_callable to mention a few).

  • provides utilities, like callable wrappers, which enable functional composition and currying on-top-of any kind of callable types (including std::bind expressions and generic lambdas).

  • provides functions that operate on std::tuple and generic containers.

  • provides utilities that allow for perfect forwarding from L/R value containers by means of forward_as or with the iterator adaptor forward_iterator.

  • includes an extensible framework for building type classes and provides the implementation of the following ones:

    • Functor
    • Bifunctor
    • Applicative
    • Alternative
    • Monoid
    • Monad
    • MonadPlus
    • Foldable
    • Show
    • Read
    • ...
  • provides instances of standard C++14 types for the above-mentioned type classes.

Notes

At the present moment the Cat library is tested under Linux with both glibcxx and libc++ library and with the following compilers:

  • gcc-4.9
  • gcc-5
  • clang-3.5
  • clang 3.6

Acknowledgements

The Cat library takes inspiration from the following projects:

cat's People

Contributors

awgn avatar

Watchers

James Cloos avatar Vitaliy Talyh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.