These are chat archives for ThoughtWorksInc/Binding.scala

29th
Mar 2016
Carl Porth
@badcarl
Mar 29 2016 23:51

Hi there,
I'm looking into using Binding.scala and am unable to render a Seq[String] via for/yield. The Seq is in a nested case class and doesn't need to be a BindingSeq. For example:

import com.thoughtworks.binding.dom

object BindingExample {
  @dom
  def template(strings: Seq[String]) =
    <ul>
      {
        for (s ← strings) yield <li>{ s }</li>
      }
    </ul>
}

I get the error:
BindingExample.scala:8: each must be inside monadic, throwableMonadic, or catchIoMonadic.
Am I missing something?