This file contains hidden or 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
// "фиксированная" структура | |
sealed trait BinTree | |
final case class BinNode(t1: BinTree, t2: BinTree) extends BinTree | |
final case class Leaf(v: Int) extends BinTree | |
// в фиксированном варианте возможно только создание простых деревьев, | |
// их структура заранее зафиксирована в определениях BinNode и Leaf | |
BinNode(Leaf(1),BinNode(Leaf(2),Leaf(3))) | |
// к примеру, невозможно создать дерево с необязательными элементами | |
// оно не скомпилируется |
This file contains hidden or 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
import outwatch.helpers.AttributeBuilder | |
import outwatch.{Attr, HtmlVNode, VDomModifier} | |
import scala.language.implicitConversions | |
object TestComponent extends TestViews(outwatch.dsl) { | |
type TModifier = VDomModifier | |
type TRes = VDomModifier | |
type AtPr = Attr |
This file contains hidden or 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
// Bootstrap 5 tabs Scala.js + Outwatch wrapper | |
final class Tab( | |
tabId: String, | |
selected: Boolean, | |
label: String, | |
content: VDomModifier, | |
) { | |
def navLi: HtmlVNode = |
OlderNewer