Created
February 1, 2010 11:06
-
-
Save rboyd/291602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> <foo thing={bar.map(el => Seq(Text(el)))} /> | |
res9: scala.xml.Elem = <foo thing="bar"></foo> | |
scala> <foo thing={baz.map(el => Seq(Text(el)))} /> | |
res10: scala.xml.Elem = <foo ></foo> | |
scala> bar | |
res11: Some[java.lang.String] = Some(bar) | |
scala> baz | |
res12: None.type = None | |
// thanks to dcsobral from #scala |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment