On Mon, Jun 22, 2009 at 5:30 PM, Nolan Darilek <no...@thewordnerd.info>wrote:
> > Wow, thanks for the quick response! > > On 06/22/2009 07:11 PM, David Pollak wrote: > > > > Try: > > > > val entries = Menu(Loc("Home", List("index"), "Home")) :: > > Layout.menus ::: User.sitemap > > > > > > Note the triple colon (:::) operator. This concatenates two lists. > > > > > Hmm, so why wouldn't I need the ::: before Layout.menus as well? I'm > assuming that's a list too, so why isn't list concatenation needed on > that end? scala> 1 :: List(2,3,4) res1: List[Int] = List(1, 2, 3, 4) scala> List(1,2,3) ::: List(4,5,6) res2: List[Int] = List(1, 2, 3, 4, 5, 6) scala> List(1,2,3) :: List(4,5,6) res3: List[Any] = List(List(1, 2, 3), 4, 5, 6) Because the thing to the Left of :: Layout.menus is a single item, not a List of items. :: prepends a single item at the head of the List where ::: concats two Lists. > > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---