跳到主要内容

touying-fn-wrapper

Wrapper for a function to make it can receive self as an argument. It is useful when you want to use self to get current subslide index, like uncover and only functions.

Example: #let alternatives = touying-fn-wrapper.with(utils.alternatives)

Parameters

fn : function

The function that will be called like (self: none, ..args) => { .. }.

last-subslide : int    default: none

The max subslide count for the slide. Used by functions like uncover, only, and alternatives-match to determine the total number of subslides needed.

repetitions : function    default: none

The repetitions for the function. It is useful for functions like alternatives with start: auto. It accepts a (repetitions, args) and should return a (nextrepetitions, extra-args).

Returns: content