phino-0.0.169: 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π΅):
normalized πΒ·1Β·1 β β¦ Ο β¦ β
, neg β¦ Ο:Ο β§ # Ξ¦.number
πΒ·1Β·2 β 42.0
πΒ·1Β·3 β β¦ Ο β¦ Ξ¦.bytes( Ο β¦ 40-45-00-00-00-00-00-00:Ξ ), neg β¦ Ο:Ο β§
morphed πΒ·1Β·4 β πΒ·1Β·3
π1Β·1 β πΒ·1Β·4 # π(ΞΎ.leftπ΅)
π(ΞΎ.rightπ΅):
morphed πΒ·1Β·5 β 7.0:Ο
undressed πΒ·1Β·6 β πΒ·1Β·5.Ο
π(πΒ·1Β·6):
πΒ·1Β·7 β 7.0
πΒ·1Β·8 β β¦ Ο β¦ Ξ¦.bytes( Ο β¦ 40-1C-00-00-00-00-00-00:Ξ ), neg β¦ Ο:Ο β§
morphed πΒ·1Β·9 β πΒ·1Β·8
π2Β·1 β πΒ·1Β·9 # undress(ΞΎ.rightπ΅)
symbolized π2 β 40-45-00-00-00-00-00-00 # 42.0
π3Β·1 β β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π2:Ξ» ), neg β¦ Ο:Ο β§ # symbolize(π1 of L_fork)
symbolized π3 β 40-1C-00-00-00-00-00-00 # 7.0
π4Β·1 β β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π3:Ξ» ), neg β¦ Ο:Ο β§ # symbolize(π2 of L_fork)
joined π4 β πΏ1Β·1 ? π2 : π3
πΒ·1Β·10 β β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π4:Ξ» ), neg β¦ Ο:Ο β§
evaluated πΒ·1Β·11 β πΒ·1Β·10 # β¦ Ξ» β€ L_fork, onπ΅ β¦ π1:Ξ», leftπ΅ β¦ πΒ·1Β·2, rightπ΅ β¦ πΒ·1Β·5 β§
normalized πΒ·0Β·1 β Ξ¦.bytes( Ο β¦ π4:Ξ» ) # πΒ·1Β·11.Ο
normalized πΒ·0Β·2 β β
:Ο # Ξ¦.bytes
πΒ·0Β·3 β Ξ¦.bytes( Ο β¦ π4:Ξ» )
πΒ·0Β·4 β π4:Ξ»:Ο
morphed πΒ·0Β·5 β πΒ·0Β·4