This document is the example project for the following blog post: Structured Concurrency in Kotlin using Arrow's parMap.
This project is a Kotlin-based application that showcases examples of structured concurrency with Arrow.
To build the project, you need to have Gradle installed. You can build the project using the following command:
./gradlew buildTo run the tests, use the following command:
./gradlew test- UserService: A service class that simulates API calls to fetch user details and user posts. It includes methods to fetch a user and their posts with simulated network delays.
- User: Represents a user with an ID and a name.
- UserPosts: Represents a user's posts with a user ID and a list of posts.
- EnrichedUser: Represents an enriched user with user details and their posts.
- UserServiceTest: A test class that uses Kotest to test the
UserServiceclass. It includes a test case to verify the generation of user IDs and concurrent processing of users withparMap.
This project is licensed under the MIT License.