Different Ways to Achieve Function Composition in Kotlin | by Stephen Siapno | Aug, 2023
FUN [CTIONAL] PROGRAMMING SERIES Function Composition Strategies: 8 Chess-Like Moves to Enhance Your Kotlin Skills with Function Composition Photo by Randy Fath on Unsplash “Function composition is a powerful concept in programming where you combine multiple functions to create a new function.” Have you ever…
Igniting High-Order Thinking: Empowering Code with High-Order Functions | by Stephen Siapno | Aug, 2023
FUN [CTIONAL] PROGRAMMING SERIES Unlocking Code Potential: Embracing High-Order Functions for Creative Thinking Photo by Simon Berger on Unsplash Have you ever wondered why we call it a “High-Order Function” in programming? The name sounds fancy, but there’s a reason behind it. To understand, let’s…
Recreating UseCase: Embracing a Fluent and Fun Approach (2023) | by Stephen Siapno | Aug, 2023
After delving into functional programming, I began to investigate ways to enhance my use case. I initiated the code below, which shares similarities with my second article on Fluent and Fun Clean Architecture. fun placeOrderUseCase(orderRepository: OrderRepository) {if (orderRepository.isLoggedIn()) {val cart = orderRepository.getCart()if (cart.isNotEmpty()) {if (orderRepository.hasEnoughFunds(getTotalPrice()))…
Transforming UseCase: Embracing Fluent and Functional Approach (2023) | by Stephen Siapno | Aug, 2023
Before we dive into the UseCase of Fluent and Fun Clean Architecture, let’s first understand how to implement it in Clean Architecture. For better understanding, Let’s consider a simple example of a use case in an e-commerce application: Use Case: Place Order Action: Customer Description:…
Fluent and Fun Clean Architecture using Kotlin — Part 2 (2023) | by Stephen Siapno | Jul, 2023
Functional programming is a powerful paradigm that emphasizes writing code in a declarative and expressive manner. In this approach, functions play a central role, and immutable data is preferred. Instead of using traditional object-oriented techniques, functional programming offers a different way of thinking about software…