Functional Programming Paradigm, Slides of Geography

The functional programming paradigm, which treats computation as the evaluation of mathematical functions, avoiding state and mutable data. It covers the definition, concepts, history, and real-time applications of functional programming. The document also compares functional programming with procedural programming, and introduces key functional programming concepts such as first-class functions, pure functions, recursion, immutable variables, and higher-order functions. It provides examples of functional programming in python, including the use of lambda expressions, map(), reduce(), and filter() functions. The document also discusses the advantages and disadvantages of functional programming, and provides guidance on transforming code from an imperative to a functional style.

Typology: Slides

2020/2021

Uploaded on 06/18/2022

heenat
heenat ๐Ÿ‡ฟ๐Ÿ‡ฆ

4 documents

1 / 53

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SRM Institute of Science and Technology
School of Computing
Advanced Programming Practice-18CSC207J
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35

Partial preview of the text

Download Functional Programming Paradigm and more Slides Geography in PDF only on Docsity!

SRM Institute of Science and Technology

School of Computing

Advanced Programming Practice-18CSC207J

(X1-X2)*(X1-X2)

Functional Programming Paradigm

Unit-III (15 Session) Session 11-15 cover the following topics:-

  • (^) Definition - S11-SLO
  • (^) Sequence of Commands โ€“ S11-SLO
  • (^) map(), reduce(), filter(), lambda โ€“ S12-SLO
  • (^) partial, functools โ€“ S12-SLO
  • (^) Other languages:F#, Clojure, Haskell โ€“ S13-SLO
  • (^) Demo: Functional Programming in Python - S13-SLO Lab 9: Functional Programming ( Case Study) (S14-15) Assignment : Comparative study of Functional programming in F #, Clojure, Haskell
  • (^) TextBook : Shalom, Elad. A Review of Programming Paradigms Throughout the History: With a Suggestion Toward a Future Approach, Kindle Edition

Concepts

  • (^) It views all subprograms as functions in the mathematical sense
  • (^) Take in arguments and return a single solution.
  • (^) Solution returned is based entirely on input, and the time at which a function is called has no relevance.
  • (^) The computational model is therefore one of function application and reduction.

Characteristics of Functional Programming

  • (^) Functional programming method focuses on results, not the

process

  • (^) Emphasis is on what is to be computed
  • (^) Data is immutable
  • (^) Functional programming Decompose the problem into

'functions

  • (^) It is built on the concept of mathematical functions which

uses conditional expressions and recursion to do perform the

calculation

  • (^) It does not support iteration like loop statements and

conditional statements like If-Else