aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/functional.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
commit4b9b761cc990f9247083ea28a32d9123bb752818 (patch)
tree9e491c67662f8378ba39c8da90b6ae6a6783d596 /docs/doc/functional.html
parentc63290ae05990f54619207ac6ee0b3fbf6f9c145 (diff)
Add a main repository link to html files and titles to spec files
Diffstat (limited to 'docs/doc/functional.html')
-rw-r--r--docs/doc/functional.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/doc/functional.html b/docs/doc/functional.html
index bc1b7c73..7e208167 100644
--- a/docs/doc/functional.html
+++ b/docs/doc/functional.html
@@ -1,4 +1,5 @@
<head><link href="../style.css" rel="stylesheet"/></head>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="functional-programming">Functional programming</h1>
<p>BQN boasts of its functional capabilities, including first-class functions. What sort of functional support does it have, and how can a BQN programmer exercise these and out themself as a Schemer at heart?</p>
<p>First, let's be clear about what the terms we're using mean. A language has <em>first-class functions</em> when functions (however they are defined) can be used in all the same ways as &quot;ordinary&quot; values like numbers and so on, such as being passed as an argument or placed in a list. Lisp and JavaScript have first-class functions, C has unsafe first-class functions via function pointers, and Java and APL don't have them as functions can't be placed in lists or used as arguments. This doesn't mean every operation is supported on functions: for instance, numbers can be added, compared, and sorted; while functions could perhaps be added to give a train, comparing or sorting them as functions (not representations) isn't computable, and BQN doesn't support any of the three operations when passing functions as arguments.</p>