What we need from hooks:

- Be able to tell what is a hook, so it must be a class.
- The user should be able to easily enable/disable hooks, without modifying
  the handler list.
  What about enabling / disabling handlers individually?  It's more general, a hook could
  have 2 lists, one of enabled handlers, the other of disabled handlers.  A
  method can enable  / disable all handlers at once.
- List all the hooks.
- Make closures more usable as handlers.  We need a handler type that can name
  the closure.
- Handlers can take parameters and can return values.  Hook should be typed accordingly.
- The handler composition can be customized, e.g. we could set a function to
  tell what to do with it, one of `reduce`, `list`, etc.
  This can be used to customize the order in which the handlers are run
  (e.g. LIFO / FIFO).
- Allow the definition of global hooks that can be associated with an object.
  We could use a hash table.
  - (find-hook 'foo-hook)
  - (find-hook 'foo-hook 'bar-class)
  - (find-hook 'foo-hook (make-instance 'bar-class))


Links:
- https://github.com/ruricolist/serapeum/issues/41
- https://github.com/atlas-engineer/next/issues/419
- https://github.com/scymtym/architecture.hooks/issues/2
- https://github.com/scymtym/architecture.hooks/issues/3

What we need from hooks:

- Be able to tell what is a hook, so it must be a class.
- The user should be able to easily enable/disable hooks, without modifying
  the handler list.
  What about enabling / disabling handlers individually?  It's more general, a hook could
  have 2 lists, one of enabled handlers, the other of disabled handlers.  A
  method can enable  / disable all handlers at once.
- List all the hooks.
- Make closures more usable as handlers.  We need a handler type that can name
  the closure.
- Handlers can take parameters and can return values.  Hook should be typed accordingly.
- The handler composition can be customized, e.g. we could set a function to
  tell what to do with it, one of `reduce`, `list`, etc.
  This can be used to customize the order in which the handlers are run
  (e.g. LIFO / FIFO).
- Allow the definition of global hooks that can be associated with an object.
  We could use a hash table.
  - (find-hook 'foo-hook)
  - (find-hook 'foo-hook 'bar-class)
  - (find-hook 'foo-hook (make-instance 'bar-class))
- Adding the same hook twice should be a no-op.


Links:
- https://github.com/ruricolist/serapeum/issues/41
- https://github.com/atlas-engineer/next/issues/419
- https://github.com/scymtym/architecture.hooks/issues/2
- https://github.com/scymtym/architecture.hooks/issues/3

Document that same handler can only appear once in a hook.
libraries/hooks: Document that same handler can only appear once in a hook.
