That's not at all the case. Templates can return values. So really, you could think of the templates as syntactic sugar around the existing functions you've got right now.
For example, the 'firstOf' template above would be responsible for scanning the AST it's given, taking each node and putting it in to a sequence. Then it instantiates a Handler with that sequence and returns it.
The problem is that they need to be given the AST. What if one constructs a handler somewhere in another module (say an authentication handler) and you import it? How can you reuse it, considering that it needs to surround other handlers (that is, if auth fails, you do not go inside inner handlers)?
With Rosencrantz it is easy: if `auth` is our authentication handler, and in your module you define a handler `h`, you can use `auth -> h`, or `auth[h]` if you want to spell `h` inline.
Now, what you could in fact do is write a template `authTemplate` that takes a handler `h` and returns `auth -> h`, so that you can still write in template style. But you have to do this for all handlers.
It could make sense to provide such templates for builtin handlers, though... want to chime in? :-)
In any case, I do not want to sound too critical. I would be happy to see a lighter syntax for Rosencrantz - I just do not know how to do it while preserving the composability of handlers.
If you have any proof of concept of how it might work, I would be glad to get a PR! :-) Ideally, it would be something that can be layered on top of the existing core, so that one could import "syntax helpers" from a separate module
For example, the 'firstOf' template above would be responsible for scanning the AST it's given, taking each node and putting it in to a sequence. Then it instantiates a Handler with that sequence and returns it.