rop 1.0.0
rop: ^1.0.0 copied to clipboard
ROP is a library designed to handle errors in a structured and fluent way using the Result<T> structure. Inspired by functional programming principles, it enables clear workflows that separate succ [...]
Changelog #
All notable changes to the ROP library will be documented in this file.
1.0.0 - 2024-12-23 #
Added #
- Initial release of the ROP (Railway Oriented Programming) library 🎉
Core Features
Result<T>structure for representing operation outcomesResult.successfor successful operationsResult.failurefor failed operations- Built-in properties:
isSuccess,value, anderrors
Extensions
-
Synchronous operations
bindfor chaining dependent operationsmapfor value transformationthenfor side effects on successfallbackfor providing alternative resultscombinefor joining two successful results into a tupletraversefor convertingList<Result<T>>toResult<List<T>>
-
Asynchronous operations
bindAsyncfor asynchronous operation chainingmapAsyncfor asynchronous value transformationfallbackAsyncfor asynchronous fallback handling
Error Handling
RopErrorclass with message property- Support for multiple error aggregation in
Result.failure - Comprehensive error propagation in both sync and async workflows