Visgraph.key: def of bend-visgraph@2.0.0.0 Import: import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph Lines 221-227 of bend-visgraph@2.0.0.0/visgraph.bend: https://jend.leeeet.dev/read.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&start_line=221&end_line=227 import Base # What a later point must beat to pop y. An equal point beats nothing, so an # interval's first highest point is its pivot. A NaN beats nothing either, # and ts2vg's argmax takes it only as an interval's first point, so a NaN at # i is the pivot of the right side of i - 1: it takes the key of the entry # below it and leaves the stack with that entry. def key(+y: F32, +below: F32) -> F32: pick(is_nan(y), below, y) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=is_nan https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=pick