Skip to content

Commit

Permalink
Add return type on poly() as well
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardcwang committed Sep 6, 2018
1 parent d213c06 commit 7d231e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2.3_control_flow.ipynb
Expand Up @@ -426,7 +426,7 @@
},
"outputs": [],
"source": [
"def poly(select: Int, x: Int) = {\n",
"def poly(select: Int, x: Int): Int = {\n",
" ???\n",
"}\n",
"\n",
Expand All @@ -444,7 +444,7 @@
"<label for=\"check-2\"><strong>Solution</strong></label>\n",
"<article>\n",
"<pre style=\"background-color:#f7f7f7\">\n",
"def poly(select: Int, x: Int) = {\n",
"def poly(select: Int, x: Int): Int = {\n",
" if(select == 0) {\n",
" poly0(x)\n",
" }\n",
Expand Down

0 comments on commit 7d231e3

Please sign in to comment.