You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* <CODE>Theta(1)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
115
115
* @param {list} xs - given list
116
116
* @returns {number} length of <CODE>xs</CODE>
117
117
*/
@@ -125,8 +125,8 @@ function $length(xs, acc) {
125
125
/**
126
126
* Returns a list that results from list
127
127
* <CODE>xs</CODE> by element-wise application of unary function <CODE>f</CODE>.
128
-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>),
129
-
* space: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
128
+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>),
129
+
* space: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
130
130
* <CODE>f</CODE> is applied element-by-element:
131
131
* <CODE>map(f, list(1, 2))</CODE> results in <CODE>list(f(1), f(2))</CODE>.
132
132
* @param {function} f - unary
@@ -147,7 +147,7 @@ function $map(f, xs, acc) {
147
147
* Makes a list with <CODE>n</CODE>
148
148
* elements by applying the unary function <CODE>f</CODE>
149
149
* to the numbers 0 to <CODE>n - 1</CODE>, assumed to be a nonnegative integer.
150
-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>).
150
+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>).
151
151
* @param {function} f - unary function
152
152
* @param {number} n - given nonnegative integer
153
153
* @returns {list} resulting list
@@ -162,7 +162,7 @@ function $build_list(i, fun, already_built) {
162
162
/**
163
163
* Applies unary function <CODE>f</CODE> to every
164
164
* element of the list <CODE>xs</CODE>.
165
-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Θ(1)</CODE> (apart from <CODE>f</CODE>),
165
+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Theta(1)</CODE> (apart from <CODE>f</CODE>),
166
166
* where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
167
167
* <CODE>f</CODE> is applied element-by-element:
168
168
* <CODE>for_each(fun, list(1, 2))</CODE> results in the calls
@@ -186,7 +186,7 @@ function for_each(fun, xs) {
186
186
* Returns a string that represents
187
187
* list <CODE>xs</CODE> using the text-based box-and-pointer notation
188
188
* <CODE>[...]</CODE>.
189
-
* Iterative process; time: <CODE>Θ(n)</CODE> where <CODE>n</CODE> is the size of the list, space: <CODE>Θ(m)</CODE> where <CODE>m</CODE> is the length of the string.
189
+
* Iterative process; time: <CODE>Theta(n)</CODE> where <CODE>n</CODE> is the size of the list, space: <CODE>Theta(m)</CODE> where <CODE>m</CODE> is the length of the string.
190
190
* The process is iterative, but consumes space <CODE>O(m)</CODE>
191
191
* because of the result string.
192
192
* @param {list} xs - given list
@@ -209,9 +209,9 @@ function $list_to_string(xs, cont) {
0 commit comments