From dfafe8becd2846fbbe5a98176b72ddaa4ed346b0 Mon Sep 17 00:00:00 2001 From: alex-eg Date: Thu, 8 Oct 2026 11:09:42 +0300 Subject: [PATCH] lay out threading.sex one step to a line --- tests/sex-programs/threading.sex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/sex-programs/threading.sex b/tests/sex-programs/threading.sex index c7c271a1..2082caa0 100644 --- a/tests/sex-programs/threading.sex +++ b/tests/sex-programs/threading.sex @@ -34,14 +34,20 @@ (pub fn main () int ;; (add (double-it 5) 3) doubled: inside out, written outside in - (printf "arithmetic: %d\n" (-> 5 double-it (add 3) double-it)) + (printf "arithmetic: %d\n" + (-> 5 + double-it + (add 3) + double-it)) (printf "a bare step needs no parens: %d\n" (-> 5 double-it double-it)) (var p (struct point) #(1 2)) (var l (struct line) #(struct line : .a (& p) .b #(3 4))) (var lp (* struct line) (& l)) ;; a member path is an ordinary step, and reads through both pointers - (printf "through a path: %d %d\n" (-> lp (. a x)) (. lp b y)) + (printf "through a path: %d %d\n" + (-> lp (. a x)) + (. lp b y)) (var q (struct point) #(3 4)) (printf "mixed with a method: %d\n" (-> q .length-sq))