From 78c7b4ed0638580f20092cfbc4ca1c5f447427cb Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 3 Jun 2025 20:55:21 -0700 Subject: infix: no phony infix over lambdas and such. * stdlib/infix.tl (funp): Do not recognize list forms as functions, such as lambda expressions or (meth ...) syntax. It causes surprisingly wrong transformations. --- stdlib/infix.tl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/infix.tl b/stdlib/infix.tl index 66bd9037..30f95081 100644 --- a/stdlib/infix.tl +++ b/stdlib/infix.tl @@ -262,7 +262,8 @@ ((@else) else)) (defmacro funp (env sym) - ^(or (fboundp ,sym) (lexical-fun-p ,env ,sym))) + ^(unless (consp ,sym) + (or (fboundp ,sym) (lexical-fun-p ,env ,sym)))) (defun-match detect-infix (((@x @y . @rest) @env) -- cgit v1.2.3