...

Text file src/cuelang.org/go/doc/tutorial/basics/0_intro/50_order.txtar

Documentation: cuelang.org/go/doc/tutorial/basics/0_intro

     1exec cue eval -i order.cue
     2cmp stdout expect-stdout-cue
     3
     4-- frontmatter.toml --
     5title = "Order is irrelevant"
     6description = ""
     7
     8-- text.md --
     9CUE's basic operations are defined in a way that the order in which
    10you combine two configurations is irrelevant to the outcome.
    11
    12This is crucial property of CUE
    13that makes it easy for humans _and_ machines to reason over values and
    14makes advanced tooling and automation possible.
    15
    16-- order.cue --
    17a: {x: 1, y: int}
    18a: {x: int, y: 2}
    19
    20b: {x: int, y: 2}
    21b: {x: 1, y: int}
    22
    23-- expect-stdout-cue --
    24a: {
    25    x: 1
    26    y: 2
    27}
    28b: {
    29    x: 1
    30    y: 2
    31}

View as plain text