# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# yamllint disable rule:line-length# The same fork as the pack beside this one, answering the join of its two# branches instead of the first of them, with one more firing standing after# it: the branch point stays in the program, since the 'plus( 6 )' below the# fork reads the symbol the two branches were joined into and not the value of# either. The line saying what that symbol stands for is what ties it to the# two. Morphing leaves each branch as a call of 'plus', and an 'evaluate' line# of the fork fires it (#1874), so the firing of a branch stands one level# deeper, under the fork that asked for it. The dispatch of Ο that ends the# program is what fires the 'plus( 6 )'.symbolic: | - Ξ»: L_number_gt dataize: πΏ1: $.Ο πΏ2: $.x π: Ξ¦.bool( Ο β¦ β¦ Ξ» β€ π β§ ) - Ξ»: L_number_plus dataize: πΏ1: $.Ο πΏ2: $.x π: Ξ¦.number( Ο β¦ β¦ Ξ» β€ π β§ ) - Ξ»: L_fork dataize: πΏ1: $.Ο morph: π1: $.then π2: $.else evaluate: π3: π1 π4: π2 join: π5: [π3, π4] π: π5location: 'Q.@'input: > β¦ bytes(Ο) β¦ β¦β§, bool(Ο) β¦ β¦ if β¦ β¦ Ο β¦ β
, then β¦ β
, else β¦ β
, Ξ» β€ L_fork β§ β§, number(Ο) β¦ β¦ gt(Ο, x) β¦ β¦ Ξ» β€ L_number_gt β§, plus(Ο, x) β¦ β¦ Ξ» β€ L_number_plus β§ β§, Ο β¦ 5.gt( 0 ).if( 1.plus( 2 ), 3.plus( 4 ) ).plus( 6 ).Ο β§result: 'π5:Ξ»'protocol: | π(Ξ¦.Ο): πΒ·0Β·1 := 5 πΒ·0Β·2 := πΒ·0Β·1.gt( x β¦ 0 ) πΌ(L_number_gt): π»(Ξ¦.aπ΅0): π(Ξ¦.aπ΅0): πΒ·1Β·1 := 5 πΒ·1Β·2 := Ξ¦.bytes( Ο β¦ 40-14-00-00-00-00-00-00:Ξ ) πΏΒ·1Β·1 := 40-14-00-00-00-00-00-00 # 5.0 πΏ1Β·1 := πΏΒ·1Β·1 # π»(ΞΎ.Ο) π»(Ξ¦.aπ΅1): π(Ξ¦.aπ΅1): πΒ·1Β·3 := 0 πΒ·1Β·4 := Ξ¦.bytes( Ο β¦ 00-00-00-00-00-00-00-00:Ξ ) πΏΒ·1Β·2 := 00-00-00-00-00-00-00-00 # 0.0 πΏ2Β·1 := πΏΒ·1Β·2 # π»(ΞΎ.x) πΒ·1Β·5 := Ξ¦.bool( Ο β¦ π1:Ξ» ) # π π(πΒ·1Β·5): πΒ·1Β·6 := Ξ¦.bool( Ο β¦ π1:Ξ» ) πΒ·1Β·7 := πΒ·1Β·6 # π(πΒ·1Β·5) πΒ·0Β·3 := πΒ·1Β·6.if( then β¦ 1.plus( 2 ) ) πΒ·0Β·4 := πΒ·0Β·3( else β¦ 3.plus( 4 ) ) πΌ(L_fork): π»(Ξ¦.aπ΅2): π(Ξ¦.aπ΅2): πΒ·2Β·1 := Ξ¦.bool( Ο β¦ π1:Ξ» ) πΏ1Β·2 := π»(π1:Ξ») # π»(ΞΎ.Ο) π(Ξ¦.aπ΅3): πΒ·2Β·2 := 1 πΒ·2Β·3 := πΒ·2Β·2.plus( x β¦ 2 ) π1Β·2 := πΒ·2Β·3 # π(ΞΎ.then) π(Ξ¦.aπ΅4): πΒ·2Β·4 := 3 πΒ·2Β·5 := πΒ·2Β·4.plus( x β¦ 4 ) π2Β·2 := πΒ·2Β·5 # π(ΞΎ.else) πΌ(L_number_plus): # πΌ(π1) π»(Ξ¦.aπ΅5): π(Ξ¦.aπ΅5): πΒ·3Β·1 := 1 πΒ·3Β·2 := Ξ¦.bytes( Ο β¦ 3F-F0-00-00-00-00-00-00:Ξ ) πΏΒ·3Β·1 := 3F-F0-00-00-00-00-00-00 # 1.0 πΏ1Β·3 := πΏΒ·3Β·1 # π»(ΞΎ.Ο) π»(Ξ¦.aπ΅6): π(Ξ¦.aπ΅6): πΒ·3Β·3 := 2 πΒ·3Β·4 := Ξ¦.bytes( Ο β¦ 40-00-00-00-00-00-00-00:Ξ ) πΏΒ·3Β·2 := 40-00-00-00-00-00-00-00 # 2.0 πΏ2Β·3 := πΏΒ·3Β·2 # π»(ΞΎ.x) πΒ·3Β·5 := Ξ¦.number( Ο β¦ π2:Ξ» ) # π π(πΒ·3Β·5): πΒ·3Β·6 := Ξ¦.number( Ο β¦ π2:Ξ» ) πΒ·3Β·7 := πΒ·3Β·6 # π(πΒ·3Β·5) π3Β·2 := πΒ·3Β·7 # πΌ(π1) πΌ(L_number_plus): # πΌ(π2) π»(Ξ¦.aπ΅7): π(Ξ¦.aπ΅7): πΒ·4Β·1 := 3 πΒ·4Β·2 := Ξ¦.bytes( Ο β¦ 40-08-00-00-00-00-00-00:Ξ ) πΏΒ·4Β·1 := 40-08-00-00-00-00-00-00 # 3.0 πΏ1Β·4 := πΏΒ·4Β·1 # π»(ΞΎ.Ο) π»(Ξ¦.aπ΅8): π(Ξ¦.aπ΅8): πΒ·4Β·3 := 4 πΒ·4Β·4 := Ξ¦.bytes( Ο β¦ 40-10-00-00-00-00-00-00:Ξ ) πΏΒ·4Β·2 := 40-10-00-00-00-00-00-00 # 4.0 πΏ2Β·4 := πΏΒ·4Β·2 # π»(ΞΎ.x) πΒ·4Β·5 := Ξ¦.number( Ο β¦ π3:Ξ» ) # π π(πΒ·4Β·5): πΒ·4Β·6 := Ξ¦.number( Ο β¦ π3:Ξ» ) πΒ·4Β·7 := πΒ·4Β·6 # π(πΒ·4Β·5) π4Β·2 := πΒ·4Β·7 # πΌ(π2) π»(π4:Ξ») β { π»(π2:Ξ»), π»(π3:Ξ») } π5Β·2 := β¦ Ο β¦ π4:Ξ», gt(x) β¦ L_number_gt:Ξ», plus(x) β¦ L_number_plus:Ξ» β§ # [π3, π4] πΒ·2Β·6 := π5Β·2 # π πΒ·2Β·7 := π5Β·2 # π(πΒ·2Β·6) πΒ·0Β·5 := Ξ¦.number( Ο β¦ π4:Ξ» ).plus( x β¦ 6 ) πΌ(L_number_plus): π»(Ξ¦.aπ΅9): π(Ξ¦.aπ΅9): πΒ·5Β·1 := Ξ¦.number( Ο β¦ π4:Ξ» ) πΏ1Β·5 := π»(π4:Ξ») # π»(ΞΎ.Ο) π»(Ξ¦.aπ΅10): π(Ξ¦.aπ΅10): πΒ·5Β·2 := 6 πΒ·5Β·3 := Ξ¦.bytes( Ο β¦ 40-18-00-00-00-00-00-00:Ξ ) πΏΒ·5Β·1 := 40-18-00-00-00-00-00-00 # 6.0 πΏ2Β·5 := πΏΒ·5Β·1 # π»(ΞΎ.x) πΒ·5Β·4 := Ξ¦.number( Ο β¦ π5:Ξ» ) # π π(πΒ·5Β·4): πΒ·5Β·5 := Ξ¦.number( Ο β¦ π5:Ξ» ) πΒ·5Β·6 := πΒ·5Β·5 # π(πΒ·5Β·4)