This package provides both a dotmethod/dotmethod module to be required and a #lang dotmethod lang-extension.
Both of these provide functionality for obj.method(x)-style method definitions and method calls, but generalized to be used for all data types that can be distinguished by predicates.
require dotmethod/dotmethod
syntax
require dotmethod/dotmethodmethod-body;ormethod-expr;afunctionexpression
'c
1
'not-found
>
five-adder.add(2)7
syntax
require dotmethod/dotmethodmethod-body
I say roughly, because unlike with just blindly adding a require, it still works properly if your-base-language doesn’t allow require forms to be inserted like that.