Closure Functions

Posted on Fri 21 May 2021 in Programming • Tagged with first-class functions, python, luajit, javascript • 1 min read

Closure are higher-order functions which return lower-order function (usually first-order function) with its environment. Defining closure functions is possible in languages which has first-class functions like Python, JavaScript, Lua, Scheme, and others.

Example

1
2
3
4
5
6
def divisiblity_check(divisor):
    """Factory for producing functions that check divisiblity with …

Continue reading

First Class Functions

Posted on Thu 20 May 2021 in Programming • Tagged with first-class functions, python, luajit, javascript • 1 min read

In most programming languages, type, object, entity, or value is considered first-class object and hence can be returned from a function, modified or assigned to a variable. If a programming language considers functions as first-class object, then the programming language is said to have first-class functions. Hence, in such programming …


Continue reading

Starting up a series of Python language

Posted on Thu 30 July 2020 in Programming • 2 min read

Python is an example of language design done well. The language is equally suited for learning as the first computer language (for kids) and running enterprise-level code (as done in many startups and established companies) at the same time. However, this incredible approachability of the language leads to very low …


Continue reading