CS141 Functional Flashcards
What is a programming paradigm?
It is a collective term to describe a group of programming languages based on a set of common properties such as programming style, how the program is evaluated and the tools made available to the programmer.
What is an imperative programming language
It is one which makes use of step by step computation.The computer follows the program like a recipe and we communicate with computer memory through the use of variables.
What is a pure function
Given the same set of inputs it produces the same set of outputs without interacting with the external world in any way (no side effects).
Why is haskell a purely functional and lazy language?
It is pure as all the definitions are pure and its lazy as it only evaluates parts of the program its needs to use for example a later expression may be evaluated before an earlier one.