feat(core): add fixedTo.{atLeast,exactly,upTo} (#340)
## Overview
Adds new features, early draft, wanted to get your opinion on the design
before committing to cleaning it up and potentially breaking it into
smaller focused PRs. Needs documentation update too.
#### `den.lib.take.upTo`
Uses the same predicate as `atLeast` to decide whether to invoke a
function, but calls the function with only the arguments it supports
unlike `atLeast` which will call the function with extra arguments
causing an error unless the function signature uses `...`. In my opinion
this is how `atLeast` should function, but I understand that this is a
breaking change if anyone is using `args@{ ctxKey, ... }` to capture the
full context. So I've introduced this as a seperate parametric type.
#### `den.lib.canTake.upTo`
An alias of `den.lib.canTake.atLeast` provided for API symmetry between
`den.lib.canTake` and `den.lib.take`
#### `den.lib.recursiveFunctor`
Much like `den.lib.functor` this takes an `apply` function and an aspect
and applies it to each include in the aspects `includes` list. However,
this also recurses into the include list and applies the function down
the include tree. Much like `fixedTo` does but without owned or static
aspects.
*Caveat:* This currently doesn't resolve static or parametric includes
and then recurse into their includes if they exist, should it? I'm not
sure why you would write aspects with this configuration, but it's
theoretically possible. I originally didn't implement this because I
thought it would be too complicated, but I think you can just call the
aspects with ctx and static ctx and then recurse into them to get at
them?
#### `den.lib.parametric.fixedTo.{exactly,atLeast,upTo}`
This family of `fixedTo` variants, follow `fixedTo`'s ability to recurse
into the import tree, but do not evaluate owned or static aspects. This
reflects the relationship between `parametric.__functor` and
`parametric.{exactly,atLeast,upTo}`.
---------
Co-authored-by: Victor Borja <vborja@apache.org>
authored by