These are chat archives for ThoughtWorksInc/Binding.scala

9th
Oct 2016
杨博 (Yang Bo)
@Atry
Oct 09 2016 01:26
You can't ++ two BindingSeq. You can ++ two Seq, but it's not recommended.
杨博 (Yang Bo)
@Atry
Oct 09 2016 01:35

You can do like this:

@dom def concatenated[A](seq1:BindingSeq[A], seq2:BindingSeq[A]) = {
  for {
    seq <- Constants(seq1, seq2)
    x <- seq
  } yield x
}

or

@dom def concatenated[A](seq1: Binding[BindingSeq[A]], seq2: Binding[BindingSeq[A]]) = {
  for {
    seq <- Constants(seq1, seq2)
    x <- seq.bind
  } yield x
}