-
What is functional programming? Functional programming (FP) is an approach to software development that uses pure functions to create maintainable software. In other words, building programs by applying and composing functions.
-
What is a pure function and how do we know if something is a pure function? Pure functions are the functions that always yield consistent output and do not have any side effects. Pure function makes the code easily readable, and testable and increases the performance.
-
What are the benefits of a pure function? Pure functions also have some performance benefits. Because they don't modify the global state, they are faster than regular functions. They also use less memory, which is important for applications with large data sets. Finally, pure functions are simple and easy to understand.
-
What is immutability? In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.
-
What is Referential transparency? Referential transparency is a fancy term that is attached to a computable expression. A piece of code is referentially transparent if we can safely replace that piece of code with the value it computes and vice-versa, anywhere where that piece is used, without changing the meaning or result of our program.
-
What is a module? n computer software, a module is an extension to a main program dedicated to a specific function. In programming, a module is a section of code that is added in as a whole or is designed for easy reusability.
-
What does the word ‘require’ do? The 'include' (or require) statement copies all of the text, code, and mark-up from the defined file into the include statement's target file.
-
How do we bring another module into the file the we are working in?
-
What do we have to do to make a module available?