phino-0.0.158: test-resources/evaluate-packs/reduces-a-carried-symbol-through-morphing.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# A 'morph' operand of the firing is a symbol the program already carried:
# π hands it back the way it found it, since a symbol is already a normal form
# and there is nothing under it to reduce. The answer then mints after it.
symbolic: |
- Ξ»: L_keep
morph:
π1: $.x
π: β¦ z β¦ β¦ Ξ» β€ π β§ β§
location: 'Q.y'
input: 'β¦ y β¦ β¦ x β¦ β¦ Ξ» β€ π4 β§, Ξ» β€ L_keep β§.z β§'
result: 'π5:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_keep):
π(ΞΎ.x):
morphed πΒ·1Β·1 := π4:Ξ»
π1Β·1 := πΒ·1Β·1 # π(ΞΎ.x)
πΒ·1Β·2 := π5:Ξ»:z # π
π(πΒ·1Β·2):
morphed πΒ·1Β·3 := π5:Ξ»:z
πΒ·1Β·4 := πΒ·1Β·3 # π(πΒ·1Β·2)
morphed πΒ·0Β·1 := π5:Ξ»