Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Curiosity w.r.t. reduce_with

10 views
Skip to first unread message

Kurt Pagani

unread,
Dec 18, 2024, 11:29:43 AM12/18/24
to pure-lang
 let r = __locals__ with x+y=x*y; end;
> r;
[(+)=>(+)]
> reduce_with r (a+b);
a*b
----
> reduce_with [(+)=>(+)] (a+b);    // as expected  ;-)
a+b
> reduce_with [(+)=>(*)] (a+b); 
a*b

How can it work with "r" in the first place? Presumably a display mistake in that the second (+) is not ===(+). Well, I have no idea ... :)

BTW, just for reporitng ...
> reduce_with [(+)=>(3)] (a+b);
Segmentation fault (core dumped)

Reply all
Reply to author
Forward
0 new messages