Skip to main content

fp_library/
types.rs

1//! Concrete data types, their corresponding implementations and type aliases.
2//!
3//! This module provides implementations of various functional programming
4//! data structures and wrappers, including `Identity`, `Lazy`, and extensions
5//! for standard library types like `Option` and `Result`.
6//!
7//! ### Examples
8//!
9//! ```
10//! use fp_library::types::Identity;
11//!
12//! let x = Identity(5);
13//! assert_eq!(x.0, 5);
14//! ```
15
16pub mod additive;
17pub mod arc_coyoneda;
18pub mod arc_ptr;
19pub mod cat_list;
20pub mod conjunctive;
21pub mod const_val;
22pub mod control_flow;
23pub mod coyoneda;
24pub mod coyoneda_explicit;
25pub mod disjunctive;
26pub mod dual;
27pub mod endofunction;
28pub mod endomorphism;
29pub mod first;
30pub mod fn_brand;
31pub mod free;
32pub mod identity;
33pub mod last;
34pub mod lazy;
35pub mod multiplicative;
36pub mod optics;
37pub mod option;
38pub mod pair;
39pub mod rc_coyoneda;
40pub mod rc_ptr;
41pub mod result;
42pub mod send_endofunction;
43pub mod send_thunk;
44pub mod string;
45pub mod thunk;
46pub mod trampoline;
47pub mod try_lazy;
48pub mod try_send_thunk;
49pub mod try_thunk;
50pub mod try_trampoline;
51pub mod tuple_1;
52pub mod tuple_2;
53pub mod vec;
54
55pub use {
56	additive::Additive,
57	arc_coyoneda::ArcCoyoneda,
58	cat_list::CatList,
59	conjunctive::Conjunctive,
60	coyoneda::Coyoneda,
61	coyoneda_explicit::{
62		BoxedCoyonedaExplicit,
63		CoyonedaExplicit,
64	},
65	disjunctive::Disjunctive,
66	dual::Dual,
67	endofunction::Endofunction,
68	endomorphism::Endomorphism,
69	first::First,
70	free::{
71		Free,
72		FreeStep,
73	},
74	identity::Identity,
75	last::Last,
76	lazy::{
77		ArcLazy,
78		ArcLazyConfig,
79		Lazy,
80		RcLazy,
81		RcLazyConfig,
82	},
83	multiplicative::Multiplicative,
84	optics::{
85		Composed,
86		Lens,
87		LensPrime,
88	},
89	pair::Pair,
90	rc_coyoneda::RcCoyoneda,
91	send_endofunction::SendEndofunction,
92	send_thunk::SendThunk,
93	thunk::Thunk,
94	trampoline::Trampoline,
95	try_lazy::{
96		ArcTryLazy,
97		RcTryLazy,
98		TryLazy,
99	},
100	try_send_thunk::TrySendThunk,
101	try_thunk::TryThunk,
102	try_trampoline::TryTrampoline,
103};