1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Functional programming traits and abstractions.
//!
//! This module contains various traits that define core concepts and abstractions
//! in functional programming. These traits provide a foundation for implementing
//! functional programming patterns and techniques in Rust.
//!
//! ## Trait Categories
//!
//! The traits are organized into several conceptual categories:
//!
//! - **Core Abstractions**: Fundamental abstractions like Functor, Applicative, and Monad
//! - **Composition Traits**: Traits related to function composition and transformation
//! - **Data Structure Traits**: Traits for working with and combining data structures
//! - **Advanced Abstractions**: More specialized abstractions for advanced functional programming
//!
//! ## Getting Started
//!
//! If you're new to functional programming, start with Functor, Applicative, and Monad
//! which form the foundation of most functional programming patterns.
// ===== Core Evaluation Concepts =====
/// Traits for evaluating and processing data.
/// Higher-kinded type abstractions for generic programming.
/// Creation of values in a computational context.
// ===== Fundamental Abstractions =====
/// Function application within a computational context.
/// Structure-preserving mapping over computational contexts.
/// Sequential computation with context binding.
/// Error handling within monadic contexts.
/// Monads with zero and plus operations.
// ===== Related Abstractions =====
/// Mapping over two-type data structures.
/// Extracting values from comonadic contexts.
///
/// This module provides the Comonad trait which represents the categorical dual of a monad.
// ===== Composition Traits =====
/// Arrow-based computation abstractions.
///
/// This module provides the Arrow trait which represents arrow-based computation abstractions.
/// Categorical composition abstractions.
///
/// This module provides the Category trait which represents a category in the sense of category theory.
// ===== Data Structure Traits =====
/// Reduction of data structures to a single value.
///
/// This module provides the Foldable trait which represents data structures that can be "folded" into a summary value.
/// Combinable types with identity elements.
///
/// This module provides the Monoid trait, which extends Semigroup to add an identity element.
/// The MonoidExt trait adds extension methods to all types implementing Monoid.
/// Combinable types without identity elements.
/// Traversing data structures with effects.
// ===== Advanced Abstractions =====
/// Choice between alternative computations.
/// Isomorphism between types.
///
/// This module provides the Iso trait which represents isomorphisms between types.