A comprehensive collection of functional programming implementations and algorithmic challenges developed throughout my Computer Science degree.
This repository documents my transition from imperative programming to the declarative paradigm, focusing on mathematical abstraction, type safety, and pure logic.
Through these exercises, I explored the unique strengths of Haskell to solve computational problems:
- Declarative Logic: Defining what a program is rather than how to change its state.
- Strong Static Typing: Leveraging Algebraic Data Types (ADTs) and Typeclasses to ensure compile-time correctness.
- Higher-Order Functions: Mastered the use of
map,filter, andfoldvariants to write concise, modular code. - Lazy Evaluation: Utilizing non-strict evaluation to work with infinite data structures and optimize computation.
- Recursion & Pattern Matching: Implementing complex algorithms via elegant recursive structures and structural decomposition.
The exercises are organized by complexity and topic:
- Fundamentals: List comprehensions, basic types, and foundational syntax.
- Algorithms: Sorting (Quicksort, Mergesort), searching, and mathematical optimizations.
- Data Structures: Custom implementations of Binary Search Trees, Graphs, and Stacks.
- Advanced Logic: Introduction to Monads (IO, Maybe, List), Functors, and Applicatives.
- GHC: Glasgow Haskell Compiler
- GHCi: Interactive environment for testing and debugging
- Stack/Cabal: For package management and build automation
These projects represent a deep dive into Lambda Calculus and the formal verification of software. Each exercise was an opportunity to apply discrete mathematics to real-world coding scenarios, emphasizing code readability and mathematical proof of correctness.
"In Haskell, a function is a first-class citizen, and purity is a way of life." Use code with caution. Would you like me to add a "Highlights" section to showcase a specific complex exercise, such as a Sudoku Solver or a Parser? AI responses may include mistakes. Learn more
Ask anything