Basic Method invocation Question #2619
-
In Clojure, method invocation can be as follows: In Hy, I see from docs I can invoke as:
or
but for whatever reason not:
I must instead return the method reference then add
Am I missing something or is this something intentional of the language design? I don't see much clarity on https://hylang.org/hy/doc/v1.0.0/tutorial#functions-classes-and-modules. Tested this using loguru as follows in hy 1.0.0 interpreter:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It is, yes. The reason that |
Beta Was this translation helpful? Give feedback.
It is, yes. The reason that
(. a b c)
doesn't compile tob.a(c)
is that it compiles to something else, namelya.b.c
. See http://hylang.org/hy/doc/v1.0.0/api#%2E.