equal
deleted
inserted
replaced
156 Try({ |
156 Try({ |
157 val x = 3 |
157 val x = 3 |
158 val y = 0 |
158 val y = 0 |
159 Some(x / y) |
159 Some(x / y) |
160 }).getOrElse(None) |
160 }).getOrElse(None) |
|
161 |
|
162 |
|
163 // minOption |
|
164 // maxOption |
|
165 // minByOption |
|
166 // maxByOption |
161 |
167 |
162 // Higher-Order Functions |
168 // Higher-Order Functions |
163 //======================== |
169 //======================== |
164 |
170 |
165 // functions can take functions as arguments |
171 // functions can take functions as arguments |