Haskell - Solving Linear Diophantine Equations - Part 3
♾️ Unlocking the power of Lazy Evaluation! This is the third (and last) video of the sereies for Diophantine Equation. In this one we take the "weird" negative answer from the last video (-3564 shirts should not be an answer) and see how to build an infinite solution "factory", using Haskell's lazy lists to generate every possible answer in the universe, and filter them to find the real-world positive solutions we need. 📚 What you will learn: - How to generate Infinite Lists in Haskell ([1..]) - How to use List Comprehensions to create complex data streams - How to filter an infinite list to find specific, positive answers - The final solution to the Red & Black shirt puzzle! 🧪 Tech stack: - Haskell (GHCi) - VS Code 🧮 The set of videos for Solving Linear Diophantine Eqations: Haskell - Solving Linear Diophantine Equations - Part 1: https://youtu.be/sVannouTu1E Haskell - Solving Linear Diophantine Equations - Part 2: https://youtu.be/rSo-Lb5D2rc Haskell - Solving Linear Diophantine Equations - Part 3: this one! 📍 Links 📝 VitoshAcademy blog: https://www.vitoshacademy.com/haskell-solving-diophantine-equation/ 📝 GitHub code: https://github.com/Vitosh/Haskell/blob/main/code/02_LDE.hs 👍 Like, 💬 Comment, and 🔔 Subscribe for more real-world programming tutorials. #haskell #functionalprogramming #math #beginners #coding
Download
0 formatsNo download links available.