Skill Wiki v0.1.0
rule @ios-swift/rule-prefer-method-over-fn

Prefer Method Over Fn

Free functions are reserved for cases with no obvious `self`: when the operation has no candidate primary owner, when it is a generic utility over multiple unrelated types, or when it forms part of a domain notation (e.…

Skill
@ios-swift
Domain
ios-swift
Version
0.1.0
Quality
4.0
Edges
2 out · 0 in
Tokens
117/267/282
$ prime install @ios-swift/rule-prefer-method-over-fn

Projection

Always in _index.xml · the agent never has to ask for this.

PreferMethodOverFreeFunction [rule] v0.1.0

Free functions are reserved for cases with no obvious self: when the operation has no candidate primary owner, when it is a generic utility over multiple unrelated types, or when it forms part of a domain notation (e.g. min(x, y), sin(angle)). Otherwise the operation belongs as a method on the most relevant type, or as a computed property when it is a value-with-no-arguments-and-no-side-effects.

Source

prime-system/examples/ios-swift/primes/compiled/@ios-swift/rule-prefer-method-over-fn/atom.yaml

Compiled at 2026-05-10