Thanks! I suspected that the answer would involve curried functions and was rereading that part of Programming in Scala, but this saves a lot of head scratching. It works beautifully.
Chas. Marius wrote: > What if you're trying a curried function: > > def isInRole_?(List[String])() = true > > and then you pass isInRole(<pass your list>) and this should return a > function that takes zero arguments. If compiler complains you can > pass > > if (isInRole(<pass your list>) _) // explicit partially applied > > Br's, > Marius > > On Oct 17, 5:21 am, "Charles F. Munat" <[EMAIL PROTECTED]> wrote: >> In the Loc I can do: >> >> If( () => true, "" ) >> >> So I can do: >> >> def isLoggedIn_?() = true >> >> If(isLoggedIn_?, "") >> >> But what if I want to pass in a list of roles? >> >> def isInRole_?(List[String]) = true >> >> Now If complains because it expects a parameterless function. >> >> There is probably some easy way around this, but I'm not seeing it... >> >> Chas. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
