hey!
been following roc for years, and really impressed with some of the changes done here.
recently with the new compiler, my understanding is that when we use . after a variable on the body of a function following with what seems like a method call like so:
foo = |x| {
x.bar("aaa")
}
that the compiler will infer this to be a method implemented for that type.
if x was a struct, that had a closure called bar inside it, how would i write this function instead?
you just need some parens! (x.bar)("aaa")
Last updated: Jan 12 2026 at 12:19 UTC