packages feed

phino-0.0.159: test-resources/evaluate-packs/joins-a-number-with-a-formation-an-undress-took-the-number-out-of.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The left side is a number and the right side a formation binding that number
# in φ alone, so š•„ brings the left side to a number and stops at the right side
# one φ short of it, and the join could never make one term of the two (#2174).
# An operand of 'undress' morphs a path from '$' where it stands, as an operand
# of 'morph' does, and then, while the term is a formation binding φ alone
# beside its ρ, dispatches φ off it and morphs that, so both sides come to a
# number. The protocol writes each such pass as an 'undressed' line naming the
# φ it took and the š•„ block named after it, and comments the line of the meta
# with 'undress' only where a pass took place.
symbolic: |
  - Ī»: L_fork
    dataize:
      š›æ1: $.on🌵
    undress:
      š‘›1: $.left🌵
      š‘›2: $.right🌵
    symbolize:
      š‘›3: š‘›1
      š‘›4: š‘›2
    join:
      on: š›æ1
      left: š‘›3
      right: š‘›4
location: 'Q.y'
input: '⟦ bytes(φ) ↦ ⟦⟧, number(φ) ↦ ⟦ neg ↦ ⟦ φ ↦ ρ ⟧ ⟧, y ↦ ⟦ Ī» ā¤ L_fork, on🌵 ↦ ⟦ Ī» ā¤ šœŽ1 ⟧, left🌵 ↦ 42, right🌵 ↦ ⟦ φ ↦ 7 ⟧ ⟧.φ ⟧'
result: 'šœŽ4:Ī»:φ'
protocol: |
  š•„(Φ.y):
    š”¼(L_fork):
      š”»(ξ.on🌵):
        š›æĀ·1Ā·1 := š”»(šœŽ1:Ī»)
      š›æ1Ā·1 := š›æĀ·1Ā·1  # š”»(ξ.on🌵)
      š•„(ξ.left🌵):
        š‘›Ā·1Ā·1 := 42.0
        š‘›Ā·1Ā·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-45-00-00-00-00-00-00:Ī” ), neg ↦ ρ:φ ⟧
        morphed š‘›Ā·1Ā·3 := š‘›Ā·1Ā·2
      š‘›1Ā·1 := š‘›Ā·1Ā·3  # š•„(ξ.left🌵)
      š•„(ξ.right🌵):
        morphed š‘›Ā·1Ā·4 := 7.0:φ
      undressed š‘›Ā·1Ā·5 := š‘›Ā·1Ā·4.φ
      š•„(š‘›Ā·1Ā·5):
        š‘›Ā·1Ā·6 := 7.0
        š‘›Ā·1Ā·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Ī” ), neg ↦ ρ:φ ⟧
        morphed š‘›Ā·1Ā·8 := š‘›Ā·1Ā·7
      š‘›2Ā·1 := š‘›Ā·1Ā·8  # undress(ξ.right🌵)
      symbolized šœŽ2 := 40-45-00-00-00-00-00-00  # 42.0
      š‘›3Ā·1 := ⟦ φ ↦ Φ.bytes( φ ↦ šœŽ2:Ī» ), neg ↦ ρ:φ ⟧  # symbolize(š‘›1)
      symbolized šœŽ3 := 40-1C-00-00-00-00-00-00  # 7.0
      š‘›4Ā·1 := ⟦ φ ↦ Φ.bytes( φ ↦ šœŽ3:Ī» ), neg ↦ ρ:φ ⟧  # symbolize(š‘›2)
      joined šœŽ4 := š›æ1Ā·1 ? šœŽ2 : šœŽ3
      š‘›Ā·1Ā·9 := ⟦ φ ↦ Φ.bytes( φ ↦ šœŽ4:Ī» ), neg ↦ ρ:φ ⟧  # š‘›3, š‘›4
    š‘›Ā·0Ā·1 := Φ.bytes( φ ↦ šœŽ4:Ī» )
    š‘›Ā·0Ā·2 := šœŽ4:Ī»:φ
    morphed š‘›Ā·0Ā·3 := š‘›Ā·0Ā·2