Your handler shadows a builtin of the same name — when the argument count matches
Pitfall 11 of writing Soma, the programming language: a habit from another language, or a rule that surprises, with what the Soma compiler answers and the form to write.
f(args) calls the program's handler f if one takes that many arguments, the builtin f otherwise. User code shadows the library, as everywhere else.
on merge(a: Int, b: Int) { return a + b + 1000 }
on use_it() { return merge(1, 2) } // 1003 — your handler
on list() { return list(1, 2) } // [1, 2] — 2 ≠ 0 arguments: the builtinsoma check warns on the two confusing cases:
on merge(a: Int, b: Int, c: Int) { … }
on use_it() { return merge(m1, m2) }
// warning: call to 'merge' with 2 argument(s) … resolves to the BUILTIN merge():
// the handler G.merge takes [3]
on list() { let items = list() … }
// warning: inside G.list, `list(…)` with 0 argument(s) calls the handler ITSELF
// (recursion), not the builtin list(). For an empty list write []Method calls (xs.count(p)) always go to builtins.