~rabbits/uxnbal

07bdb9b1aa720bb8a3acc919f90e56d649dbd183 — Devine Lu Linvega 10 months ago 62f59aa
Added lambda examples
1 files changed, 17 insertions(+), 5 deletions(-)

M etc/example.tal
M etc/example.tal => etc/example.tal +17 -5
@@ 137,13 137,25 @@ JMP2r
JMP2r

(
@|Unnamed labels )
@|Anon labels )

@unnamed-sublabel ( str* -: )
@anon-label ( str* -: )
	LDAk #18 DEO
	INC2 & LDAk ?unnamed-sublabel
	INC2 & LDAk ?anon-label
	POP2 JMP2r

@test-unnamed ( str* -: )
	unnamed-sublabel/
@test-anon ( str* -: )
	anon-label/
	JMP2r

(
@|lambdas )

@lambda-jci1 ( a -- a )
	#01 ?{ INC } JMP2r
@lambda-jci2 ( -- a )
	#01 ?{ #02 JMP2r } JMP2r
@lambda-jsi ( -- a )
	{ "hey $1 } STH2r JMP2r
@lambda-jmi ( -- a )
	!{ #01 JMP2r } #01 JMP2r