rok-utils 0.2.2

Laravel/AdonisJS-inspired utility helpers for the Rok ecosystem
Documentation
//! Functional programming utilities.
//!
//! This module provides composition helpers, lazy evaluation, and memoization,
//! inspired by Laravel's pipeline and AdonisJS middleware patterns.
//!
//! # Example
//!
//! ```rust
//! use rok_utils::fp::{pipe, compose, tap};
//!
//! // Pipe - thread value through functions
//! let result = pipe(5, vec![|x| x + 1, |x| x * 2]);
//! assert_eq!(result, 12); // (5 + 1) * 2
//!
//! // Compose - create new functions
//! let add_then_double = compose(|x: i32| x * 2, |x: i32| x + 1);
//! assert_eq!(add_then_double(5), 12);
//!
//! // Tap - side effects without changing value
//! let mut log = Vec::new();
//! let result = tap(42, |v| log.push(*v));
//! assert_eq!(result, 42);
//! ```

pub mod compose;

#[cfg(feature = "random")]
pub use compose::shuffle;
pub use compose::{apply, compose, memoize, or_default, pipe, retry, tap, Lazy};