~/bend-docscommunity

general/compound/ops.bend checks

raw source on the hub · import 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/ops.bend as Ops

5 imports
import Base
import ../rose/type.bend as R
import ../rose/ops.bend as RO
import ./edge/type.bend as E
import ./type.bend as C

Definitions

def keys source · line 7 · raw

@-N:Data -> @c:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/type.Compound<N> -> List<&2, String>

def edges source · line 12 · raw

@-N:Data -> @c:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/type.Compound<N> -> List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge>

def has source · line 18 · raw

@+ks:List<&2, String> -> @+k:String -> Bool

---- invariants ----

def ends_resolve source · line 21 · raw

@es:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge> -> @+ks:List<&2, String> -> Bool

def resolves source · line 31 · raw

@-N:Data -> @+c:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/type.Compound<N> -> Bool

Every edge joins two keys the forest has.

def distinct source · line 34 · raw

@+ks:List<&2, String> -> Bool

def unique source · line 38 · raw

@-N:Data -> @c:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/type.Compound<N> -> Bool

No key names two things.

def above_of source · line 43 · raw

@+k:String -> @ps:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/rose/ops.Place> -> List<&2, String>

---- lifting: an edge as seen when only some keys are visible ---- A key shows as itself when visible, else as its nearest visible ancestor, else not at all ("").

def visible_or source · line 52 · raw

@hit:Bool -> @+k:String -> @rest:String -> String

def first_visible source · line 59 · raw

@cands:List<&2, String> -> @+visible:List<&2, String> -> String

def shown_as source · line 66 · raw

@+k:String -> @+ps:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/rose/ops.Place> -> @+visible:List<&2, String> -> String

def drawn source · line 69 · raw

@+a:String -> @+b:String -> @es:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge> -> Bool

def keep source · line 78 · raw

@c:Bool -> @e:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge -> @rest:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge> -> List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge>

def keep_edge source · line 86 · raw

@+a:String -> @+b:String -> @l:String -> @t:String -> @+rest:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge> -> List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge>

An edge is kept when both ends show, as two different things, not already drawn.

def lift_edges source · line 89 · raw

@es:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge> -> @+ps:List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/rose/ops.Place> -> @+visible:List<&2, String> -> List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge>

def lift source · line 99 · raw

@-N:Data -> @c:0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/type.Compound<N> -> @+visible:List<&2, String> -> List<&2, 0x3ffc69d4b5da64782dbe50fda425aa0c/general/compound/edge/type.Edge>

The compound's edges between the visible keys, each end moved up to what shows.