Skip to content

Gerges-Wageh/Functional-Programming-Sessions-Eng.Hammad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Functional Programming Examples by Eng. Mohammed Hammad in Java

"Functional Programming is all about making programming soild and robust as mathematics and should be viewed from that point"

Welcome to the repository that contains all the examples discussed in the Functional Programming sessions by Eng. Mohammed Hammad. This repository serves as a comprehensive resource for understanding various functional programming concepts through practical examples.

Table of Contents

Introduction

This repository contains a collection of valuable functional programming examples discussed during the sessions by Eng. Mohammed Hammad. The aim is to provide clear and concise examples that illustrate key concepts in functional programming, making it easier for developers to grasp and apply these principles in their own projects.
You can find the complete recorded sessions via this Link

Prerequisites

To run the examples in this repository, you will need:

Installation

Clone this repository to your local machine using the following command:

git clone https://github.com/Gerges-Wageh/Functional-Programming-Sessions-Eng.Hammad.git

Navigate to the project directory:

cd Functional-Programming-Sessions-Eng.Hammad

Usage

To run the examples, open the project in your preferred IDE and execute the main class for each example. Each example is contained within its own package for ease of navigation.

Sessions

Session 1: Introduction To Declarative Programming

In this session example we discussed an OOP style code with global states to contrast how bad the idea of global states.

Session 2: Pipeline Concept

In this session we introduced the pipeline concept through simple example solved once imperative and once declarative.

Session 3: Higher-Order Functions

In this session we introduced the idea of "Funtions As Data", and illustrated how to store a function in a delegate (Functional Interface in Java) and deal with them the way you deal with data (i.e. storing them in different data structures, passing them through functions, returning them from functions).
We illustrated the concept of "Higher-Order function" via an example where we used a higher order function that accepts a function as a parameter to calculate some data internally without expose this as a separate step in the pipeline

Session 4: Comprehensive Example

In this session we discussed an example that may change your way of thinking about programming, the example illustrates the idea of looping over a list of functions and pumping them through the pipeline as we deal with data!
The solution constructed two pipelines, the first pumping data through a function which internally pumping a list of functions though another pipeline to apply them on the same piece of data!

Session 5: Function Composition

This session discussed a very critical concept in functional programming which is Function Composition. We see the power of function composition in the session 6 example.

Session 6: Comprehensive Real Life Problem

In this session we solved a huge real life business problem, an outstanding example to cover all the functional programming concepts so far. We saw how Function Composition is a powerful property to develop a testble, extendable and robust code for a very complex problem while maintaning the granularity.

Session 7: Closures

In this session we discussed the concept of closures and saw the benifit of returning a function that maintaing state inside from another function.

Session 8: LINQ or Java Stream API Under The Hood

This is the most interesting part, when you understand the whole magic, and how things work under the hood.

Acknowledgments

Special thanks to the great Eng. Mohammed Hammad for his insightful sessions on functional programming.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages