insertDown method

ZipperLocation<ZR, ZI, ZS> insertDown(
  1. ZR d
)

Insert down

Implementation

ZipperLocation<ZR, ZI, ZS> insertDown(ZR d) {
  if (!sectionP(node)) {
    throw Exception("down of item");
  }
  final t = node as ZS;

  return update(
    node: d,
    path: NodePath<ZS, ZR>(
      left: List<ZR>.unmodifiable([]),
      parentPath: path,
      parentNode: node,
      right: getChildren(t),
    ),
  );
}