phino-0.0.158: test-resources/evaluate-packs/joins-two-numbers-into-one-symbol-keeping-the-constant-a-method-holds.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# Both sides are copies of 'number', so both carry its method 'neg', and 'neg'
# holds the library constant '-1'. The left side is the literal '42', the
# right one a number some firing computed. A 'symbolize' line turning every
# datum of a term into a symbol turned the '-1' of each side into a symbol of
# its own, and the join joined the two into one more symbol, though both sides
# hold the same '-1' there (#2131). The line leaves a method of a formation
# holding no Ξ» alone, so the '42' alone becomes a symbol, π4, the '-1' stays a
# datum on both sides, and the join makes one symbol, π5, of π4 and π2.
symbolic: |
- Ξ»: L_fork
dataize:
πΏ1: $.c
morph:
π1: $.a
π2: $.b
symbolize:
π3: π1
π4: π2
join:
on: πΏ1
left: π3
right: π4
location: 'Q.y'
input: 'β¦ number β¦ β¦ Ο β¦ β
, neg β¦ β¦ Ο β¦ ΞΎ.Ο.times( x β¦ Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ β¦ Ξ β€ BF-F0-00-00-00-00-00-00 β§ ) ) ) β§ β§, bytes β¦ β¦ Ο β¦ β
β§, y β¦ β¦ c β¦ β¦ Ξ» β€ π3 β§, a β¦ Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ β¦ Ξ β€ 40-45-00-00-00-00-00-00 β§ ) ), b β¦ Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ β¦ Ξ» β€ π2 β§ ) ), Ξ» β€ L_fork β§.Ο β§'
result: 'π5:Ξ»:Ο'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π»(ΞΎ.c):
πΏΒ·1Β·1 := π»(π3:Ξ»)
πΏ1Β·1 := πΏΒ·1Β·1 # π»(ΞΎ.c)
π(ΞΎ.a):
πΒ·1Β·1 := 42.0
morphed πΒ·1Β·2 := πΒ·1Β·1
π1Β·1 := πΒ·1Β·2 # π(ΞΎ.a)
π(ΞΎ.b):
πΒ·1Β·3 := Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ π2:Ξ» ) )
morphed πΒ·1Β·4 := πΒ·1Β·3
π2Β·1 := πΒ·1Β·4 # π(ΞΎ.b)
symbolized π4 := 40-45-00-00-00-00-00-00 # 42.0
π3Β·1 := β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π4:Ξ» ), neg β¦ Ο.times( x β¦ -1.0 ):Ο β§ # symbolize(π1)
π4Β·1 := π2Β·1 # π2
joined π5 := πΏ1Β·1 ? π4 : π2
πΒ·1Β·5 := β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π5:Ξ» ), neg β¦ Ο.times( x β¦ -1.0 ):Ο β§ # π3, π4
πΒ·0Β·1 := Ξ¦.bytes( Ο β¦ π5:Ξ» )
morphed πΒ·0Β·2 := πΒ·0Β·1