diff --git a/Assets/Lectures/Haskell/L2.md b/Assets/Lectures/Haskell/L2.md deleted file mode 100644 index cb1f043..0000000 --- a/Assets/Lectures/Haskell/L2.md +++ /dev/null @@ -1,55 +0,0 @@ -# 20CYS312 - Principles of Programming Languages -![](https://img.shields.io/badge/Batch-21CYS-lightgreen) ![](https://img.shields.io/badge/UG-blue) ![](https://img.shields.io/badge/Subject-PPL-blue)
-![](https://img.shields.io/badge/Lecture-2-orange) ![](https://img.shields.io/badge/Practical-3-orange) ![](https://img.shields.io/badge/Credits-3-orange) - -## Haskell GHCi Interpreter - Lecture Notes - -### Introduction (5 minutes) -- Welcome and brief overview of the session. -- Introduction to Haskell and GHCi (Glasgow Haskell Compiler Interactive). - -### Getting Started with GHCi (10 minutes) -### Installation -- Mention how to install Haskell and GHCi. - -#### Opening GHCi -- Open GHCi in the terminal or command prompt. - -#### Basic Commands -- `:load` or `:l` to load a Haskell file. -- `:reload` or `:r` to reload the loaded file. -- `:quit` or `:q` to exit GHCi. - -### Haskell Basics (10 minutes) -#### Variables and Types -- Declare variables using `let`. -- Basic data types: `Int`, `Double`, `Char`, `Bool`. - -#### Functions -- Define functions using `let`. -- Example functions and their types. - -#### Lists -- Create lists and perform basic operations. -- List comprehensions. - -### Interactive Coding Session (10 minutes) -- Demonstrate live coding in GHCi. -- Solve a simple problem or implement a small program interactively. - -### Advanced GHCi Features (5 minutes) -#### Type Information -- Use `:type` or `:t` to get the type of an expression. - -#### Documentation -- Access Haddock documentation in GHCi. - -#### Debugging -- Utilize GHCi for debugging Haskell code. - -### Conclusion (5 minutes) -- Recap of key points. -- Resources for further learning. -- Q&A. - - diff --git a/Assets/Lectures/Haskell/L3.md b/Assets/Lectures/Haskell/L3.md deleted file mode 100644 index e999058..0000000 --- a/Assets/Lectures/Haskell/L3.md +++ /dev/null @@ -1,93 +0,0 @@ -# 20CYS312 - Principles of Programming Languages -![](https://img.shields.io/badge/Batch-21CYS-lightgreen) ![](https://img.shields.io/badge/UG-blue) ![](https://img.shields.io/badge/Subject-PPL-blue)
-![](https://img.shields.io/badge/Lecture-2-orange) ![](https://img.shields.io/badge/Practical-3-orange) ![](https://img.shields.io/badge/Credits-3-orange) - -## Haskell Functions and Types - Lecture Notes - -### Introduction (5 minutes) -- Welcome and brief overview of the session. -- Importance of functions and types in Haskell. - -### Functions in Haskell (15 minutes) - -#### Function Declaration -- Syntax: `functionName :: Type1 -> Type2 -> ... -> ReturnType` -- Example: -```haskell -add :: Int -> Int -> Int -add x y = x + y -``` - -#### Function Application -- Applying functions with space. -- Example: -``` -result = add 3 5 - -``` - -#### Currying -- Explanation of curried functions. -- Example: -``` -add :: Int -> (Int -> Int) -add x y = x + y -``` - -#### Anonymous Functions (Lambda) -- Syntax: \parameter -> expression -- Example: -``` -square = \x -> x * x -``` - -#### Higher-Order Functions -- Functions that take functions as arguments or return functions. -- Example: -``` -applyTwice :: (a -> a) -> a -> a -applyTwice f x = f (f x) -``` - -### Types in Haskell (15 minutes) -#### Type Declaration -- Explicit type declarations. -- Example: -``` -add :: Int -> Int -> Int -add x y = x + y -``` - -#### Common Types -- Int, Integer, Double, Char, Bool, Lists. -- Examples: -``` -numbers :: [Int] -chars :: String -``` - -#### Polymorphism -- Type variables and polymorphic functions. -- Example: -``` -identity :: a -> a -identity x = x -``` - -#### Custom Data Types -- Defining data types with data keyword. -- Example: -``` -data Point = Point Float Float -distance :: Point -> Point -> Float -``` - -### Interactive Coding Session (5 minutes) -- Demonstrate live coding in GHCi. -- Solve a simple problem or implement a small program interactively. - -### Conclusion (5 minutes) -- Recap of key points on functions and types. -- Emphasize the importance of type safety in Haskell. -- Resources for further learning. -- Q&A.