File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1414< body >
1515
1616<!--
17- This project has webpack configured. Run `yarn webpack-dev-server` and navigate to
17+ This project has webpack configured. Run `yarn` to install the dependencies, `yarn webpack-dev-server` to run the server, and then navigate to
1818 http://localhost:8080/src/main/html/Part1Ex1.html to view this page.
1919
2020tinymce.init is the most important API function of TinyMCE. In its most basic form, you specify a CSS selector for an
5858
5959</ body >
6060
61- </ html >
61+ </ html >
Original file line number Diff line number Diff line change 2929 */
3030const parseIntOpt = ( s : string ) : Optional < number > => {
3131 const n = parseInt ( s ) ;
32- return Number . isNaN ( n ) ? Optional . some ( n ) : Optional . none ( ) ;
32+ return Number . isNaN ( n ) ? Optional . none ( ) : Optional . some ( n ) ;
3333} ;
3434
3535export const toPositiveInteger = ( n : number ) : Optional < number > =>
@@ -117,7 +117,7 @@ A common way to handle an Optional value is to provide a default value if in the
117117You can do this with fold, but getOr is a shortcut.
118118*/
119119
120- // TODO: Using getOr, take an Optional<{age: string }> and turn it into an {age: string }, using a default value of 0.
120+ // TODO: Using getOr, take an Optional<{age: number }> and turn it into an {age: number }, using a default value of 0.
121121
122122// TODO: Write the same function using fold
123123
@@ -137,7 +137,7 @@ Let's explore this by converting Optionals to and from Arrays.
137137One of the most useful functions on Optional is "map". We say this function "maps a function over the Optional".
138138
139139If the Optional is some, it runs the function over the some and returns the result as a "some".
140- If the Optional. is none, it returns none.
140+ If the Optional is none, it returns none.
141141
142142Above, we talked about how an Optional is like an array restricted to 0 or 1 elements, so mapping over an Optional
143143is very similar to mapping over an array (which we did in Exercise 2).
You can’t perform that action at this time.
0 commit comments