manpagez: man pages & more
info goops
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.7 Invoking Generic Functions

When a variable with a generic function definition appears as the first element of a list that is being evaluated, the Guile evaluator tries to apply the generic function to the arguments obtained by evaluating the remaining elements of the list. [ *fixme* How do I put this in a more Schemely and less Lispy way? ]

Usually a generic function contains several method definitions, with varying degrees of formal parameter specialization (see section define-method). So it is necessary to sort these methods by specificity with respect to the supplied arguments, and then apply the most specific method definition. Less specific methods may be applied subsequently if a method that is being applied calls next-method.


© manpagez.com 2000-2025
Individual documents may contain additional copyright information.