Write a function split [list, $s]$ that takes two lists as arguments. The first list, list, is any list, the second list, $s$, is a list of nonnegative integers. The result should be the partitioning of the first list into sublists whose lengths are given by the elements of $s$ in turn.
(Table Cant Copy)
This partitioning is possible only if the sum of the elements of $s$ is equal to the length of list. Formally, the result of
$$
\operatorname{split}\left[\left\{e_1, e_2, \ldots, e_n\right\},\left\{s_1, s_2, \ldots, s_m\right\}\right]
$$
is equal to
$$
\left\{\left\{e_1, \ldots, e_{s_1}\right\},\left\{e_{s_1+1}, \ldots, e_{s_1+s_2}\right\}, \ldots,\left\{e_{s_1+\ldots+s_{m-1}+1}, \ldots, e_{s_1+\ldots+s_m}\right\}\right\},
$$
with $n=s_1+\ldots+s_m$.