Your brain crashes just because of unfamiliarity with the syntax. Just mentally translate it into C++ or Rust syntax.
template<typename A, typename B, typename C, typename D, typename E>
std::variant<std::string, std::tuple<B, C, std::vector<D>, E> processRecord(std::function_ref<B(A const&)>, std::optional<C> const&, std::span<D>, std::function_ref<bool(E const&)>, std::tuple<B, C, std::vector<D>, E>);
This familiarity can be gained in frankly a day or two of trying, and afterwards you’ll find it to be clear and information dense. The example doesn’t even involve anything truly mind blowing for a beginner yet, like the Traversable class, the lens/traversal/prism signatures, or polymorphic recursion.