Nicola Bonelli – Italian C++ Community https://www.italiancpp.org Mon, 24 Aug 2020 13:03:53 +0000 it-IT hourly 1 https://wordpress.org/?v=4.7.18 106700034 Cat: a C++14 functional library https://www.italiancpp.org/2015/04/29/cat-a-c14-functional-library/ https://www.italiancpp.org/2015/04/29/cat-a-c14-functional-library/#comments Wed, 29 Apr 2015 14:20:36 +0000 http://www.italiancpp.org/?p=4682 haskell-logo

The rise of functional programming has affected many programming languages, and C++ could not escape from it. The need of paradigms like partial application (via currying) and functional composition are now a reality also in C++, and the spread of libraries like FIT and FTL is an evidence.

Cat is a C++14 library, inspired by Haskell. Cat aims at pushing the functional programming approach in C++ to another level.

The added value of Cat is twofold. On one hand it works for filling the gap in the language with respect to functional programming. For this purpose, some utility functions and classes are provided (callable wrappers with partial application, sections, utilities for tuples, extended type traits, alternative forwarding functions, etc).

On the other hand Cat promotes the use of generic programming with type classes, inspired by Category Theory. A framework for building type-classes along with a dozen of them (Functor, Applicative, Monoids, Monads, Read, Show, to mention just a few) and the related instances dropped in the context of C++ are included in the library.

Cat is distributed under the MIT license and it’s available for download at the address https://cat.github.io.
]]>
https://www.italiancpp.org/2015/04/29/cat-a-c14-functional-library/feed/ 2 4682