dynamical.seq.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamical-fsm_3 Show documentation
Show all versions of dynamical-fsm_3 Show documentation
Mode-dependent dynamical systems
package dynamical.seq
case object EOS
extension [A] (as: Seq[A])
def through[B](p: Seq[A] => Seq[B]): Seq[B] =
p(as)
def noneTerminate: Seq[Option[A]] =
as.map(v => Some(v)) :+ None
def noneTerminate2: Seq[Option[A]] =
as.map(v => Some(v)) :+ None :+ None