From f7bf9ddeb0dc7bfd38cb81b60d3320c967c0c361 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sat, 1 Sep 2018 13:31:49 +0300 Subject: [PATCH] Add first-class and higher-order functions --- glossary/First-class-function.md | 3 +++ glossary/Higher-order-function.md | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 glossary/First-class-function.md create mode 100644 glossary/Higher-order-function.md diff --git a/glossary/First-class-function.md b/glossary/First-class-function.md new file mode 100644 index 000000000..dcae4b979 --- /dev/null +++ b/glossary/First-class-function.md @@ -0,0 +1,3 @@ +### First-class function + +A programming language is said to have first-class functions if it treats them as first-class citizens, meaning they can be passed as arguments, be returned as values from other functions, be assigned to variables and stored in data structures. \ No newline at end of file diff --git a/glossary/Higher-order-function.md b/glossary/Higher-order-function.md new file mode 100644 index 000000000..df993a2e1 --- /dev/null +++ b/glossary/Higher-order-function.md @@ -0,0 +1,3 @@ +### Higher-order function + +Higher-order functions or functors are functions that either take other functions as arguments, return a function as a result, or both. \ No newline at end of file