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