In the following Parser definition
def rep[T](p: => Parser[T]): Parser[List[T]]
I see the argument is a function. There is no type after p:, so what is it’s type?
Thanks
Basu
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
pis actually not a function. An unpreceded=>in the type description means that the argument is passed by name. Basically, it is not evaluated until it is used in the method, and it is evaluated every time that it is used in the method. Please see my answer here for a bit more info.