reset password
Author Message
Anon
Posts: 134
Posted 22:40 Sep 30, 2013 |

i just wanna make sure i understand the max function we worked on thursday.

when we say xs.head.max( max( xs.tail ) ) we are first using the function from the Int class. so 3.max(4) gives 4. this so far isnt related to the function max we are writing.

but inside the parenthesis we are calling our own function that we created on the list that is the tail. is this right?

rabbott
Posts: 1649
Posted 11:32 Oct 01, 2013 |

Right. The max function inside the parentheses is a call to your max function.