Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit be1ddaa

Browse files
Improve introduction to functions, and replace problematic example
This commit removes an example with a sexist connotation from the documentation. The example was added without ill intent and without reflection, not understanding what it conveys. Having been alerted to its history, it is, however, obviously inappropriate and demeaning. The author would like to thank an attentive and honest reader for pointing it out, and apologize for perpetuating an idea that has no place in this project, nor in the world at large for that matter.
1 parent 6505a48 commit be1ddaa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/learn/code/functional.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Introduction to functions
2828
The base for all our efforts will be **functions**. These are series of steps
2929
that we can teach a computer to perform, similar to a recipe. This means that,
3030
instead of talking through many individual steps every time we need something
31-
done, we can say something like `make me a sandwich <http://xkcd.com/149/>`_,
32-
and the computer will handle the details for us. Other ways of thinking about
33-
functions include magical spells, or very specialized machines that we can
34-
build, that do our bidding at the press of a single button.
31+
done, we can ask them to complete the entire task, and the computer will handle
32+
the details for us, having been taught the necessary steps. Other ways of
33+
thinking about functions include magical spells, or very specialized machines
34+
that we can build, that do our bidding at the press of a single button.
3535

3636
Besides reducing the need for repetition, there are several other advantages of
3737
using functions in our code. One related plus is that the code becomes much more
@@ -76,7 +76,7 @@ As just mentioned, a function call can hide very complex operations from us,
7676
saving us from having to calculate a square root on our own, as in the last
7777
example. Thus, a function can replace any other code by returning an equivalent
7878
value. If we had a function called ``plusTwo``, typing ``1 + 2`` and
79-
``plusTwo(1)``, and analogously ``let new_number = 1 + 2`` and ``let new_number
79+
``plusTwo(1)``, and analogously ``let new_number = 1 + 2`` and ``let new_number
8080
= plusTwo(1)`` are for our purposes entirely equivalent. A function call can act
8181
as a stand-in for an expression that results in the same value, or a variable
8282
name that represents the same value.
@@ -246,7 +246,7 @@ our experiments?
246246
.. [#f2] You might have noticed that the name, in this case, is also split into
247247
two parts, separated by the period. This signifies that the ``log`` function
248248
is part of the ``console`` object. Grouping of functions in objects is often
249-
used for tidyness -- you might have noticed that all functions belonging to
249+
used for tidiness -- you might have noticed that all functions belonging to
250250
``lab.js`` are contained in the ``lab`` object, as in ``lab.HTMLScreen``.
251251
252252
Similarly, functions that pertain to a specific element in the experiment are

0 commit comments

Comments
 (0)