[Question]
  [
05AB1E has the `£` builtin which, given a list of integers `b` and a string `s`, splits `s` into sublists of lengths equal to the elements in `b`. For example, `[1,2,3,4,1] "hello world"£` produces `["h", "el", "lo ", "worl", "d"]`. Your task is to imitate this behaviour.
Given a list \$L\$ containing \$n\$ elements, and a list \$B\$ of positive integers that sum to \$n\$, emulate the behaviour of `£` in 05AB1E. \$L\$ will always contain positive digits (so `123456789`), \$n\$ will always be greater than or equal to \$1\$ and will never exceed your language's maximum integer.
If you have a builtin which mimics this *exact* behaviour, such as 05AB1E's `£`, you may not use it. Every other builtin, including ones that partition the input into slices of a given integer length are acceptable. Essentially, any command that is not a standalone answer to this challenge is acceptable.
You may take the two lists in any [convenient method](https://codegolf.meta.stackexchange.com/q/2447/66833) or format, including taking \$L\$ as an integer. You may optionally take \$n\$ as input. You may output in any format that clearly shows the sublists of \$L\$, distinct from each other. For example, outputting integers separated by newlines, or outputting a list of lists of digits.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code in bytes wins.
## Test cases
```
L, B -> output
[[4, 5, 1, 2, 6, 1, 7, 9, 6], [2, 4, 3]] -> [[4, 5], [1, 2, 6, 1], [7, 9, 6]]
[[4, 2, 8, 7, 3, 5, 9, 3, 1, 9, 1, 8, 1, 7, 2, 8, 3, 7, 6], [1, 3, 1, 14]] -> [[4], [2, 8, 7], [3], [5, 9, 3, 1, 9, 1, 8, 1, 7, 2, 8, 3, 7, 6]]
[[8, 7, 4, 6], [1, 3]] -> [[8], [7, 4, 6]]
[[7], [1]] -> [[7]]
[[6, 4, 3, 8, 9, 3, 6, 5, 7, 8, 3, 2, 5, 1, 2], [3, 3, 3, 3, 3]] -> [[6, 4, 3], [8, 9, 3], [6, 5, 7], [8, 3, 2], [5, 1, 2]]
[[2, 7, 9, 3, 8, 1, 5], [4, 3]] -> [[2, 7, 9, 3], [8, 1, 5]]
[[1, 9, 8, 9, 6, 3, 4, 2, 3, 4, 1, 8, 5, 5, 2, 9, 3, 6, 7], [3, 1, 2, 13]] -> [[1, 9, 8], [9], [6, 3], [4, 2, 3, 4, 1, 8, 5, 5, 2, 9, 3, 6, 7]]
[[1, 8, 7, 8, 9, 4, 2, 5, 2, 7, 1, 5, 2, 3, 8, 4, 6, 9, 1, 9, 3, 4, 6, 7, 6, 5, 3], [7, 7, 3, 8, 2]] -> [[1, 8, 7, 8, 9, 4, 2], [5, 2, 7, 1, 5, 2, 3], [8, 4, 6], [9, 1, 9, 3, 4, 6, 7, 6], [5, 3]]
[[7, 4, 4, 7, 5, 5], [1, 2, 3]] -> [[7], [4, 4], [7, 5, 5]]
[[9, 2, 8, 7, 2, 3, 9, 5, 8, 1, 5, 2], [2, 2, 2, 2, 2, 1, 1]] -> [[9, 2], [8, 7], [2, 3], [9, 5], [8, 1], [5], [2]]
[[8, 7, 3], [3]] -> [[8, 7, 3]]
[[8, 2, 7, 3, 9, 5, 6, 9, 5, 3, 1, 9, 7, 5, 3, 6, 4, 1], [2, 1, 2, 6, 2, 2, 3]] -> [[8, 2], [7], [3, 9], [5, 6, 9, 5, 3, 1], [9, 7], [5, 3], [6, 4, 1]]
[[8, 2, 3, 7, 4, 7, 7, 4, 5, 5, 8, 1, 2, 3, 3], [3, 7, 4, 1]] -> [[8, 2, 3], [7, 4, 7, 7, 4, 5, 5], [8, 1, 2, 3], [3]]
[[4, 3, 8, 9, 9, 3, 2, 5, 5, 8, 2, 8, 1, 1, 4, 1], [10, 5, 1]] -> [[4, 3, 8, 9, 9, 3, 2, 5, 5, 8], [2, 8, 1, 1, 4], [1]]
[[6, 3, 2, 9, 5, 6, 1, 4, 9, 4, 2, 5, 6, 8, 8, 5], [4, 3, 2, 1, 2, 2, 2]] -> [[6, 3, 2, 9], [5, 6, 1], [4, 9], [4], [2, 5], [6, 8], [8, 5]]
[[2, 2, 1, 6, 8, 5, 2, 6, 7, 9, 4, 5, 8, 1, 9, 6, 3, 8, 7, 3, 9, 1], [6, 7, 1, 2, 2, 2, 2]] -> [[2, 2, 1, 6, 8, 5], [2, 6, 7, 9, 4, 5, 8], [1], [9, 6], [3, 8], [7, 3], [9, 1]]
```
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jellylanguage), 3 bytes
```
Rṁ@
```
[Try It Online!](https://jht.hyper-neutrino.xyz/tio#WyIiLCJS4bmBQCIsIsOnQC/igqzFkuG5mOKCrFkiLCIiLFsiW1s0LCA1LCAxLCAyLCA2LCAxLCA3LCA5LCA2XSwgWzIsIDQsIDNdXSwgW1s0LCAyLCA4LCA3LCAzLCA1LCA5LCAzLCAxLCA5LCAxLCA4LCAxLCA3LCAyLCA4LCAzLCA3LCA2XSwgWzEsIDMsIDEsIDE0XV0sIFtbOCwgNywgNCwgNl0sIFsxLCAzXV0sIFtbN10sIFsxXV0sIFtbNiwgNCwgMywgOCwgOSwgMywgNiwgNSwgNywgOCwgMywgMiwgNSwgMSwgMl0sIFszLCAzLCAzLCAzLCAzXV0iXV0=)
Equivalently, `ṁR}` but with the arguments the other way around.
```
R    Range (vectorizes)
 ṁ@  Mold the right argument to the shape of the ranges
```
```
ṁ    Mold the left argument to the shape of:
 R}  Range (vectorizes) of the right argument
```
[Answer]
# [Python 2](https://docs.python.org/2/), 39 bytes
```
lambda L,B:[map(L.pop,[0]*x)for x in B]
```
[Try it online!](https://tio.run/##VVLLbsIwELznK3yEyqqwnfiBxIUzf5DmQNWiRoIQIarSr0/tHa9xJR/W9u7M7M7Ov/ev66SX0@5tOR8v7x9HcZD7bX85zqvD63ydZb8ZXh7r0/UmHmKcxH5Yfr7G86dQ2yal7sZp/r6v1o2Yb@N0F6dVfFwvfStFJ4WSQkthKXBShBgPUvTxLf6boUlp8eLp11BJoEBRoOgLtUgzFBOI4kTVRiBAtNVffHQUx8CCkCBAYInMMaguclOJobd8Yrlm9YYFdSkt9wCtQLaUg64QoIeOjq7YXSbCiFQG8qwpMArKHFgZ16NVHlJgMovxUKZJBI4n61NrTY8ZtfTa5TagIAkIlRsgCpTmC3t2rz7JgWIAkRpcNXMDxHJQ7HV8hT0qg5el0UWYZz2OxSPoKnk624WxugxJK1aMD5XZKNRcrp4a1AbbgMUx7FvHm9z@t8cShK@WgueSZ4QNwpPlddDsVuBOPM/FsuIyPpJleQ2e0x/@AA "Python 2 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 5 bytes
I've tried to implement `£` manually way too often because the docs just say *`£` - Head. Push `a[0:b]`*, which is exactly what this builtin does if you just pass a single integer.
```
L˜Å¡¦
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f5/Scw62HFh5a9v9/tJmOgrmOgqGOghEcxXJFQ1hAUaC0hY6CKZgLUWqpo2ACFrEAK7AEixuDueZgBlDEMBYA "05AB1E – Try It Online")
`L` convert each length `n` into a range `[1 .. n]`  
`˜` flatten into a list of integers  
`Å¡` split the sequence on `1`'s (the only truthy value in 05AB1E)  
`¦` remove the leading empty list that was created by splitting at index 0
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 3 bytes
-2 thanks to ovs!
```
⍸⍛⊆
```
How does it work?
Firstly `⍸2 4 3` is `1 1 2 2 2 2 3 3 3`.
We can then use this to partition (`⊆`) the right argument into chunks.
[Try it online!](https://tio.run/##jVQ9jxMxEO35Fe7S7Als79rrGukEFCARuihFTsnRnDgKChCiAkXi0EZQXEVFdx0VEvX9FP@RsJ55Y3tXnHRSFM3a4zdv3nxs3l6cbD9sLi5fn@zev9u92e62x2Mc/sbhZ7zaH0/j/nscDvHq8@1vG/c/4uF6@fLx@P/qydOlit@@qPPR4@NGnSXHw/Wz5Yvntzdx@EN3Z/Hrr/HpaRxuHm4@Hc/VYrVqG9U1SjfKNMqR4RsVRnvdqNV4Nt7b9Xohrum0OKcvcV8vHgjgeNsTjiXwQIYmQ9MVR2E3S7YDMDvqVkKCRYJLpk1/94YUSkymraIAvkcCbe1NgTQ8fD52rAUF4PCOsvMS0mQliSmd4QcwQKRrgCQTMDi1eC9QEt5IYaykS7WoylM8AEU@8p614rCOULhQbLCGHf1MlZ9HKlxyLaEAli4DUrBgcw/IilIv@gXhw96e2QtczyWScgeJ4bjQ5GlRSy8vTCE7DwOB54GgmzTK/4PhrS39Qrct3XaTEbG5iVibFhS7ujChmhfONpBHn5lhBupfmhGAB3jIiEgiAVR6zCl9mNlMWB4qTAOOKhcjejInJ0YePi@f3NsaDPKKMBMhenCVtgoQc4IL8j4LzQ3Wcso1NStz7cXoKukMZo9D@YxQvS/jP0Eo82MqifJ6yzsgVHPPYY0E10UO/YgXQ9midwKUbQcIWUV5BVkZpk7WdTsdHkfP@2o9SMOgecouAlapgcYTOpLV20H/Hqp09UpiZCejbmRKgmjZS6M4STv3kwawr9kVgnN00Jnjs0LcMg61lrUuc0AK/gM "APL (Dyalog Extended) – Try It Online")
[Answer]
# [J](http://jsoftware.com/), 6 bytes
```
</.~I.
```
[Try it online!](https://tio.run/##RYxNCoNADIX3nuLhZirEsTFT/9BVoSC46hWKIt30Br36NM0gLgLfy/t5x9y7DdMAB8IVg17pcX8ujzhW/jv7WGTra//gEgg3AhNqQmPQEnrlAhtqBMgZ1EhnvlipN2ADNiu1U0yMbYaPIIc01v6fCTsVolLiDw "J – Try It Online")
Called with the list as left arg, grouping mask as right arg.
The whole thing is a dyadic hook, so that...
* `I.` applies only to the grouping mask, and expands it in place using unique elements. Eg, `I. 2 4 3` becomes:
```
0 0 1 1 1 1 2 2 2
```
* `</.~` That mask is used to group `/.` the list itself, putting each group into a box `<`.
[Answer]
# [Python 2](https://docs.python.org/2/), 42 bytes
Inputs \$ L \$ and \$ B \$ as two comma separated lists from STDIN, and outputs sublists each on one line.
```
L,B=input()
for x in B:print L[:x];L=L[x:]
```
[Try it online!](https://tio.run/##VVK7bsMwDNz9FYKnFtBQSbYeLrJk9h8YngoXMVA4RpCi7tenEk9UVEADJZF3Rx733/vluunHz2X9WoQaxHIsH6Jt28coz6d127/vL6/N5/UmDrFu4jzst3W7i3Eajvl9PI3TMcwPemtS0dRJ0UuhpNBSWAqcFCHGsxRTfIv/Zm5SWrx4@jVUEihQFCj6Qi3SDMUEojhRdREIEF31Fx8dxTGwICQIEFgicwyqi9xUYugtn1iuWb1hQX1Kyz1AK5At5aArBOihp6MrdpeJMCKVgTxrCoyCMgdWxvVolYcUmMxiPJRpEoHjyfrUWjNhRh299rkNKEgCQuUGiAKl@cKe3atPcqAYQKQGV83cALEcFHsdX2GPyuBlaXQR5lmPY/EI@kqeznZhrC5D0ooV40NlNgo1l6unBvWGbcDiGPat503u/ttjCcJXS8FzyTPCBuHJ8jpoditwJ57nYllxGR/JsrwGz@nPfw "Python 2 – Try It Online")
[Answer]
# JavaScript (ES6), 44 bytes
Expects `(a)(b)`.
```
a=>g=([v,...b])=>v?[a.splice(0,v),...g(b)]:b
```
[Try it online!](https://tio.run/##HclNCsMgEEDhq8xyBqZD018aMD2IuFBrJEViiMXrW9vdx3tvW23x@7J9Dmt@hTarZtUUFerKIuIMqak@tZWypcUHPHKl34joyIyu@byWnIKkHHFGfWG4MgwMJ4bbH3eGR7ch1L31fzZE7Qs "JavaScript (Node.js) – Try It Online")
(or [**43 bytes**](https://tio.run/##HclNCsMgEEDhfU/hcoZMh/SfFkwPIkLUGkmQGGrw@la6@3hvMcVk9523/bimj6@TrEYOQYIqxMxWoxzK23De4uw89FSwGw9jF8Diy1aX1pyi55gCTKCuJG4kTiTOJO5/PEg8mzWCaq39i0asPw) with linefeeds)
[Answer]
# [Haskell](https://www.haskell.org/), 34 bytes
```
(zipWith take<*>).scanl(flip drop)
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P81WoyqzIDyzJEOhJDE71UbLTlOvODkxL0cjLSezQCGlKL9A839uYmaebUFRZl6JSpqCkgdQY6pCbn5OiqJStKGOsY6JjkHsfwA "Haskell – Try It Online")
`scanl(flip drop)` takes the input and sucessively drops off prefixes.
```
Prelude> scanl(flip drop) "Test string, test string, 123" [6,1,2,3]
[ "Test string, test string, 123"
, "tring, test string, 123"
, "ring, test string, 123"
, "ng, test string, 123"
, " test string, 123"
]
```
Note that the first result will always be the input string.
Once we have that we apply `zipWith take` to then take off the prefixes for each size.
[Answer]
# [R](https://www.r-project.org/) >= 4.1, ~~30~~ 29 bytes
```
\(L,B)split(L,rep(seq(!B),B))
```
[Try it online!](https://tio.run/##Hco7CoAwEITh3lOs3S5ME6MGBZvU3iIYEMRX4vnjajUfP3OXOJX47CGvx84zvKRzW7PqXk5Oy8W1F61SIgduQR3IgBpQ/8OBBrWAAmvUgxWpIjuYb8xoYaW8 "R – Try It Online")
An anonymous function taking two vectors and returning a list of vectors.
Thanks to @pajonk for saving a byte!
[Answer]
# [WolframLanguage (Mathematica)](https://www.wolfram.com/mathematica/), ~~28~~ 25 bytes
```
TakeDrop~FoldPairList~##&
```
–3 bytes from att.
[Try it online!](https://tio.run/##bVM9T8MwEN35FZYqMXnAdvw1IDEgJoYObIghgqpEpRSFbFX710Ny52fstFKGq@/uvXd3r/t2@Nzs26F7b8ft/fjS7jaP/eHn/HT4@li3Xf/c/Q7n1ep2XPfd9/CwfT02UlgplBRaCkeBlyJO8UmK4/Q25c3pTdyUDdNzoDpDzZECRYGiFKNwmaGY4BQKVVNBMlhTVFVpT6/Vk2NhRMD0jqR4UOo81txs6C19FZDGvAbC7dxwMTVPx2yOqnkPHPDUlj5dKPKJnNerLiADFEfgMYBnJWAIvBwsOILW8Wqp0sxUHlcJ8@DVDqmhobxNQ7KqWlQsrsvkkRpCVpR8UX7zRa8clCSZZUJDIwM7BNlCHj/5yCoRZovqK7ID1HoMyYEtxOt0fj6JT@ALa2dLxcJGDKEBpP51qTv22dKcBj6w@Fc19ZEdgYXCbthk2urSpZx0MJrG9SPmDNifwxR5zSTVwVa64hj/AA)
With the prohibitied built-in (introduced in 2017 with v. 11.2), it's 8 bytes:
```
TakeList
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 7 bytes
```
~cʰ\l₎ᵐ
```
[Try it online!](https://tio.run/##VVK7TsQwEPwVKwWVkbCd@NHwIyEFHIgrIkW65oQQFFcg0SA@5RoaPoG/uPuRkMx6jJFcrNfrmdmdvdvdbrZP4/Ro5@d9oy6vVbO/OL8dz4fD6fv95fT1Ob9ufo434/nwsV7mvm@2D@M4qf20G@8b3RtttdOtNsOg@77VqtPKaGW18giCVmmJB636Jbe8OxYu14h3h08JgUFg8CS/pcwhBoxhoWkBJSBt9Yp0wA2hF2IACY0HZSC0LbLXTw65fABg2YejsG4tLN2IakH3qJL@JJBuOhxbKQiZTMZlClSkskQc@RiEmchRmubAEum8jAqVbqUInHJcG8RsUNgi3@VmRIWISJU7QpZQGIuC7Gd9VkcqQ0DtmLDUIECeQbE88CpmmUxQVslW8iJVBTYhQVeJtNk@GXHIoHn1yiqkyn75aglg/nSYK9kPLpOjjx23vP1vlgdIrNaEE8rT4lZJ0nNBLN1L7CdyPp6qyxghzXMtbIU9/AI "Brachylog – Try It Online")
`~cʰ` split the left argument into groups, `\` transpose so we have a list of (group, length), `l₎ᵐ` map each pair: the right element is the length of the left element (which is also the output of `l`).
[Answer]
# [Haskell](https://www.haskell.org/), ~~35~~ 34 bytes
```
x?(c:d)=take c x:drop c x?d
x?_=[]
```
[Try it online!](https://tio.run/##bY5BCoMwEEX3nuITulCIC7WtNCBZd9UDhFDECIqpESvU26dJisVCZzH5A/PepKufQ6u1tSuPG6aSaqmHFg1WpmYz@cBVtPJ7JaR91P0IxnC9IU6iMFVQJgKmuR8XHEA65zJ4mVkrAg6RUeQUBcWRIpP4VppCkI5Q0mrXHOK6p9yjiNwZhQNPjg2ecwglxcVl6f15MBfyYwzLkm5n/bqfNuDHWwZ@/6f/FbyllPYN "Haskell – Try It Online")
-1, thanks Wheat Wizard!
[Answer]
# [Factor](https://factorcode.org/), 24 bytes
```
[ [ cut swap ] map nip ]
```
[Try it online!](https://tio.run/##lVbJbhsxDL37K9gPiFFJoy0Fcg166SXIyejBGEzRoI3jeiYoCsPf7mookdoSoE0GDmWRfI/r5Nt@XF5O18eHz1/ub2Gefr1Oh3Ga4cd0Okw/YT/PL@MMx9O0LH@Op6fDAp82m/MGws85/A4AGkAASACDggXwq3xZFcK3QUOFwwU@wM1dtsHrwg7P2fZSIgQdh44VonkUBAoCryJsVFMoGwaIqmJoORA/9IwHFf/8B0JmGfkNNXCF6DjEoTW2ZFMZ2ErHpEyuSJGewWRYoiRzJVI05VN5NlyVyNzzgXzSjWJ32XfmJKnainKU6trXvFAl30k9u4v5dqkHVqex9lGIddD4yCIHXLzUTaJBJq@o5TlMxUz/CaFi6SjtnihGC5uCSi5dKnXqIk84JvXPqqm4KyzZyI5/h0cV6TApt7kR38EmD6ppxFVnQB3dTKnquzPmb@AQdFtRX8xuzIlHLZdJ0xiWj4B2Fjyr5nHNAXum6niVaFLqp1Tlca/mk@4qfUmVicwNCbwfLB1NaiIix8tNvpU/xxHlBvZclhqGgrRV2XiQxRucFe0jS4IuMi95K0Rgm/00DIsG7ZwVgyzrrJbLm1eWL9aUTp2ezEWZOvExbbL2pfG@p2KXk7e8UcsVqmiyNb2uhnqKDTpx9SbL1ZTdeBZOi@IJtvYkEUfNpXOcQd2u1QhoaCFJGlxP2XfUfobywl0qGMBWtFvmHQwx7KA4l7ENDfdNfqepYtussVyuO9jB@LrA/Ht/hK/wHD4PT0G6noMC/ltxt363g@12G@6n/fj9@hc "Factor – Try It Online")
Mapping the lengths to the part of the input that gets 'cut off.' Cutting a sequence into two parts and getting at the results is efficient in bytes because both pieces just end up on the data stack, instead of locked away inside some collection. Process looks something like this:
1. `"hello world" { 1 2 3 4 1 }`
2. `"ello world" { "h" 2 3 4 1 }`
3. `"lo world" { "h" "el" 3 4 1 }`
4. `"world" { "h" "el" "lo " 4 1 }`
5. `"d" { "h" "el" "lo " "worl" 1 }`
6. `"" { "h" "el" "lo " "worl" "d" }`
7. `{ "h" "el" "lo " "worl" "d" }`
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-m`](https://codegolf.meta.stackexchange.com/a/14339/), 3 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Takes `B` as the first input.
```
VvU
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LW0&code=VnZV&input=WzIsIDQsIDNdCls0LCA1LCAxLCAyLCA2LCAxLCA3LCA5LCA2XQotUQ)
```
VvU     :Implicit map of each U in first input (B)
V       :Second input (L)
 vU     :Remove and return the first U elements
```
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 8 bytes
```
{.=x!&y}
```
[Try it online!](https://ngn.bitbucket.io/k#eJx9VF1rGzEQfPevUCGUHIgQSSfp5KH/Im8hkL4YSguBPNmE9Ld3dlZ2nZaWA/lud2b2Uz7s3+6+HD99Pr3vdg/7t5vH08/X/SHchSOeX77j9vnw9dsPHHHC6/L0vnt4vF1DDSnk0Hj2MEJDDmsoC8yD6YE8y5MTctgILSQOnolnosXo5in8bSSaJ63UiSvEQCz4D8XVTXl1vlE36NN9kRJpQYxdn83yJNsUG5PpUspeD0qYD2WEhJAQEkJCSNfOKr4oqQpvwLRBNodZ5qbTCLVG2GmVVD55ZtJR1NFkGiIgDsYt+CfjLL6piCFpc3eLLNJmbVDbhiSatYy+wgZ1+bOiXSnggwKkgD8UiCke3Pq80lTn1NX+zpRXyOioMYdvKQ2aN5fngM8Ph04mcbCRW2DirIWIFTH/nnIBQ0S9TVtWJSbbdPqidL3ZCBPyXNU8EyQH0fo9cEVixG6FQaTlol60W11nncmblZnIllxRPb3CYeK4v+cb4Gs35rqZUpZaUpbp3nZQN+gvIC5A2+W5x0WbUHUH18v4G5GbL2PwwrOGPPGqONE7oBtWWe7GXOt5oY3TtGlZwx4qZ1NTmzLzdic0rUm+RLji4gOXOcP+IkhG12ithl+YaNNx)
Takes the list of values as `x` and the lengths of the chunks as `y`.
* `&y` convert length of chunks from e.g. `2 4 3` to `0 0 1 1 1 1 2 2 2`
* `x!` make a dictionary mapping the original input to these indices
* `=` "group" that dictionary (i.e., map the distinct values of the dictionary to their corresponding keys)
* `.` return just the values (i.e., the original values, split into chunks of the correct lengths)
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 2 bytes
```
ɾ•
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLJvuKAoiIsIiIsIlsyLDQsM11cbls0LDUsMSwyLDYsMSw3LDksNl0iXQ==)
~~If generators weren't so broken, it'd just be `vɾ•` and flagless.~~ Thank goodness for Vyxal 2.8 lol.
## Explained
```
ɾ•
ɾ    # vectorise range for each item in the shape list
•   # and mold that to the shape list
```
So essentially, a port of hyper's jelly
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 3 bytes
```
m%s
```
[Run and debug it](https://staxlang.xyz/#c=m%25s&i=%22451261796%22,+%5B2,+4,+3%5D%0A%224287359319181728376%22,+%5B1,+3,+1,+14%5D%0A%228746%22,+%5B1,+3%5D%0A%227%22,+%5B1%5D%0A%22643893657832512%22,+%5B3,+3,+3,+3,+3%5D%0A%222793815%22,+%5B4,+3%5D%0A%221989634234185529367%22,+%5B3,+1,+2,+13%5D%0A%22187894252715238469193467653%22,+%5B7,+7,+3,+8,+2%5D%0A%22744755%22,+%5B1,+2,+3%5D%0A%22928723958152%22,+%5B2,+2,+2,+2,+2,+1,+1%5D%0A%22873%22,+%5B3%5D%0A%22827395695319753641%22,+%5B2,+1,+2,+6,+2,+2,+3%5D%0A%22823747745581233%22,+%5B3,+7,+4,+1%5D%0A%224389932558281141%22,+%5B10,+5,+1%5D%0A%226329561494256885%22,+%5B4,+3,+2,+1,+2,+2,+2%5D%0A%222216852679458196387391%22,+%5B6,+7,+1,+2,+2,+2,+2%5D%0A&m=2)
Takes a string of digits, and the partitions as an integer array.
outputs each slice with a newline.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 44 26 bytes
```
->b,l{b.map{|x|l.shift x}}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y5JJ6c6SS83saC6pqImR684IzOtRKGitvZ/gUJadLSRjomOcayOQrSBjgIQGSIhIwiKjeUCqzQEqTKPjf3/HwA "Ruby – Try It Online")
*-18 thanks to dingledooper*
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 10 bytes
```
≔⮌θθＥη⭆ι⊟θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/9@xuDgzPU8jKLUstag4VaNQU0ehUNOaK6AoM69EwzexQCNDRyG4BMhLB3EydRQC8guAqoDA@v//6GgTHQVTHQVDHQUjHQUzMMNcR8ESyI7VUYgGigHljWNj/@uW5QAA "Charcoal – Try It Online") Link is to verbose version of code. Outputs a newline-separated list of digit strings. Explanation:
```
≔⮌θθ
```
Reverse `L`.
```
Ｅη⭆ι⊟θ
```
For each element of `B`, pop that many elements from `L`, and concatenate the digits into a string for output.
[Answer]
# Scala, 64 bytes
```
s=>_./:(Seq[Any]()->s){case(a->s,x)=>(a:+s.take(x),s drop x)}._1
```
[Try it online!](https://scastie.scala-lang.org/c5MQyZHoSTiM8VzZUy3NCw)
Called as `f(fullList)(sublistSizes)`
```
s =>   //The sequence of integers to be split
 _     //The sizes for it to be split into
  ./:  //Fold over it,
   (Seq[Any]()->s) //Starting with an empty list of sublists, and the original list
   {case(a->s,x) => //a is the current list of sublists, s is the current full list, x is the current element
    (a:+s.take(x),  //Add the first x elements of s as a sublist
     s drop x)      //Drop x elements from the full list
   }._1             //Only keep the list of sublists
```
[Answer]
# [Desmos](https://desmos.com/calculator), ~~128~~ 117 bytes
```
a=length(B)
g(l)=\sum_{k=1}^{[1...length(l)]}l[k]
f=\prod_{n=1}^a\{g(B)[n]+n=[1...\length(L)+a]:0,1\}
h(L,B)=L[g(f)]f
```
Implements a function \$h(L,B)\$. Output is a list of numbers, with each sublist separated by a zero.
[Try It On Desmos!](https://www.desmos.com/calculator/igbi9nh40m)
[Try It On Desmos! - Verbose](https://www.desmos.com/calculator/qptje1kxju)
### Explanation:
`a=length(B)`: A helper value that stores the length of the list `B` specified in the challenge description.
`g(l)=\sum_{k=1}^{[1...length(l)]}l[k]`: A helper function that returns the running total(as a list) of the list argument `l`.
`f=\prod_{n=1}^a\{g(B)[n]+n=[1...\length(L)+a]:0,1\}`: Creates a list of 0's and 1's, which will be used later to determine the format of the final outputted list(`0`'s mean sublist separator, `1`'s mean to put an element of `L` there, where `L` is specified in the challenge description.).
`h(L,B)=L[g(f)]f`: The actual function that outputs the answer, with each sublist separated by a zero.
[Answer]
# [Python 3](https://docs.python.org/3/), 76 bytes
```
def f(x,n):x=iter(x);return[[*islice(x,a)]for a in n]
from itertools import*
```
[Try it online!](https://tio.run/##FcoxDsIwDADAnVdYnZLKSykTiJdEGSqaqJZSO3JdEV4fYL6rH9uE597XlCG7huzv7UmW1DX/0GSncggjHYVe6ceLj1kUFiAGjpesssN/m0g5gPYqamOvSmwuu2FLpQi8Rcs6YJjwijPecIre9y8 "Python 3 – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~65~~ 58 bytes
```
f(s,b,l)int*s,*b;{for(;l--;s+=*b++)printf("%.*ls ",*b,s);}
```
[Try it online!](https://tio.run/##ZVNbboMwEPzPKSxLkXiYtn4kkDppL9AbpHzEJERIrlPFlVo14uqla56OQPKyzMzujjEUybkomqYMLFFEh5X5iiyJlLyVl2sgdZJIG@8iFcfh5xXIMsDLh0hbhEFEbCjrBlD0cahMEKLbAsHleiBL0Q69YbGibE3TzRrLHmcdzrKUrzacbmhGU5bxdFLwVpGlYoJEC6Xjs93ngNwsJdAQFoclajmMR4p2AuAEQbyWHco6FKqgACIVA8MnZoBED/lttduVrX5PlzJQNHzs0wjyvkozT8E8BRsV3FNwT8FHhfAUwlOI0PfS@QNPxI11gbvQ7ylCqn9Lygkc7@jhLcHxosD1qczx9AOyJ9mn22G0tdNoyCWK41YxnPN01s6u3bdkLkdu/GC0JWiP4YhCeV@ooFDNC50t7Sg9o0bbxnSe4b5F2nkzxjd2Z8AujzDemFeI@BlDVHtjcs9OPXOdo@QFYU8y/CLzDb6bQVcv6uavKPXhbJvk@x8 "C (gcc) – Try It Online")
Inputs a pointer to a list of digits as a wide-character string, a pointer to a list of integer lengths and that list's length (since pointers in C carry no length info).  
Outputs the sub-lists separated by spaces.
[Answer]
# [Julia 1.0](http://julialang.org/), ~~33~~ ~~30~~ 25 bytes
```
l/b=b.|>a->splice!(l,1:a)
```
[Try it online!](https://tio.run/##jVXLbtswELz7K1jkkgBMGpISHwHsHzF0sFsXcCG4QawCPeTfXXF3ViSVFgggCCtyOTucfejn7/F8MH9ut/HrcXt8et8dHnfX1/H87fTlftTm5fBwm07X6brdb/b7TqteK6OV1cqTEbRKsz1otZ/X5n03DErfqcedYve8Uw7kLzkyMOC8EwnHEXgiw5BhaIujsJsj2wOUHU1XhwSTDJlNl1@fhs2UmExXRangIy7QiTcFMZVHoGXPWhA4h/Z0uyDh7KIksaQ1PBUYYLILgLIJKKw6YAhcDm8lMU6uSnlYpad4AYr88nnWiUN6QuFEscH69fTY6n4BV@F0mzoUALNDwhUcGH0CFpSi6JeED3sGZi5QkdMjqU6C7znJ5OmQxyAnbEt2HQoCr4NBNymWfwfEWcf1Qjsd7fRNe7imiFibDjR7SUyq@oVvm2g3LqxQ//WTe6QCT/CSFpGLJNCJ6FP6sFVPOG6oqhuwDBcrejInL8bSeEE@ua4Noi/jwX4QIoKrlFaCmA02yIdFaC4wilCoOenrIEZfSWfRexwmyOmGSCmbNUrpH1tk4vG2zIBU9T2HtRLcFDnMMw@Gdor@F6RMO8BgHPEIctJIvYzrrm0eT0djNR6kYFA87SwCXsmBwTFaktHbQ/8IVXoZSYzspc2tdEgSHaMUipcrL/VkABpqdi3BdQTQWcdghbhkPPItY136ICs4bH78elOTOl8U/QA3So36qLZqmq3Xt/NlGi/380/zQW1Ol@@3vw "Julia 1.0 – Try It Online")
Thanks to dingledooper for -3 bytes and to MarcMush to further -5.
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 39 bytes
```
param($u,$v)$u|%{,$v[$s..(($s+=$_)-1)]}
```
[Try it online!](https://tio.run/##jVRdb9pAEHznV1ipW2H1HNVn@@xThYSE2oe@NCp9Qyii1GlSAaa2SSsl/Ha6O3t2AKdVsDh/7M7s7N7ubcvfRVXfFqtVuCyr4uDfjB4O20W1WA/9nfLvA3/3@PqBHmZ@fXk5HPr125F/HYRRMN8f9oPxcODRT42HfCUqVZHSytCaKatMQAatEhUHgfIuZjNymKuZc6EnOM3nF8Epi1Y54WNis7RGtEb0hTnZEtMdzBGMUdKSEyGQdI/p/x/0eUgOl3Skji@HwKTvncHPeWXnVsP5UiAObiiFDEG1lIaRsXKXYwCAYgFCd4DwTjDkQcDzKBoFjpFYyqxPRXYmMJDxHMkF4VCG0FxqXrlAKV3aqc5EJ29U1NICR6QWEpn@n@h@yBxlsAjIjhkrAzznCmOPLMgM7w/ZYpaQoQ1yqlur4YgIpTmiQsK8XaTxlA6ecW8byZyQOZUCcrJxt6mcXYIGSPsltK5DWb8lh1wkSLe3F3WmY7PQKo0pOi3mIMcM8JN@riFRga4Z@UPfS6NArMFglX7P8MR9FYkmmTh9lGEOTRgVZVGfjgD6MlczhfaMnoscY2gyrKmrgkZfo3kyhO@igesE4BpULHH/FJAhsm54mF8jRtTmFb3joeqOlp6/Ow@A4GOnP6kxejbFgZV07WkIlHdTpaR8umtCB3NFi9Aq/CbnT4qS5Ugu7U8tkxnMi0ZvWtQix7YZpCAbigQNmlufRD@iQLwjEuTIm2ewrXJ@SbtJ7oH36H0sqw@L5W34@dvPYtl4D5DnN0XdTBZ1oTy/@LMlQ/HdG3n@tVjrprrb/CBbvV3dNWxo/cVeFfVuxd/f@DetkwNRxEm5uS@q5msZfqrLjRdOyvWWEDWws6vpZFc35Vr0zMciiH/T3XJJbhzOBQiLX0/63neOr6YSavTSoAJqcxG9L4B8adN0emDYD/aDw18 "PowerShell Core – Try It Online")
Two test cases are not working because PowerShell flattens simple jagged arrays, i.e. `[[7]]` becomes `[7]`
[Answer]
# [Uiua](https://uiua.org), ~~5~~ 3 [bytes](https://www.uiua.org/pad?src=U0JDUyDihpAgK0BcMOKKlwpEZWNvZGUg4oaQIOKHjOKKjy0x4pa9wrEu4o2Y4ouv4oav4oqCwq8x4qe74ouv4qe7LOKHjOKItSjihpjCrzHii68rMjU2KSAtQFwwKzEKJnAg4oqCIjggYml0IGVuY29kaW5nOlx0IiBTQkNTICLih4ziio8tMeKWvcKxLuKNmOKLr-KGr-KKgsKvMeKnu-KLr-Knuyzih4ziiLUo4oaYwq8x4ouvKzI1NikiIOKKgitAXDDih6ExMjkiLiziiLY74oiYwqzCscKv4oy14oia4peL4oyK4oyI4oGFPeKJoDziiaQ-4omlKy3Dl8O34pe_4oG_4oKZ4oan4oal4oig4qe74paz4oeh4oqi4oeM4pmt4ouv4o2J4o2P4o2W4oqa4oqb4oqd4pah4oqU4omF4oqf4oqC4oqP4oqh4oav4oaZ4oaY4oa74per4pa94oyV4oiK4oqXL-KIp1xc4oi14omh4oi64oqe4oqg4o2l4oqV4oqc4oip4oqT4oqD4oqZ4ouF4o2Y4o2c4o2a4qyaJz_ijaPijaQh4o6L4oas4pqCzrfPgM-E4oiefl9bXXt9KCnCr0AkXCLihpB8IyIKJnAg4oqCImRlY29kZWQ6XHQiIERlY29kZSAiwqPCsS0xwrjChy7DjMKlwrPCsMKIMcKfwqXCnyzCo8K_KMK1wogxwqUrMjU2KSIg4oqCK0BcMOKHoTEyOSIuLOKItjviiJjCrMKxwq_ijLXiiJril4vijIrijIjigYU94omgPOKJpD7iiaUrLcOXw7fil7_igb_igpnihqfihqXiiKDip7vilrPih6HiiqLih4zima3ii6_ijYnijY_ijZbiipriipviip3ilqHiipTiiYXiip_iioLiio_iiqHihq_ihpnihpjihrvil6vilr3ijJXiiIriipcv4oinXFziiLXiiaHiiLriip7iiqDijaXiipXiipziiKniipPiioPiipnii4XijZjijZzijZrirJonP-KNo-KNpCHijovihqzimoLOt8-Az4TiiJ5-X1tde30oKcKvQCRcIuKGkHwjIg==)
```
⊕□⊚
```
[Try it!](https://uiua.org/pad?src=ZiDihpAg4oqV4pah4oqaCgpmIFsxIDIgMyA0IDFdICJoZWxsbyB3b3JsZCIKZiBbM10gWzggNyAzXQpmIFsxIDNdIFs4IDcgNCA2XQ==)
-2 thanks to Bubbler
```
⊕□⊚
  ⊚  # where
⊕□   # group with boxing
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), ~~5~~ 4 bytes
```
CmR¹
```
[Try it online!](https://tio.run/##yygtzv7/3zk36NDO////RxvqmOgY6RjHglgwaASFhgYGsQA "Husk – Try It Online")
```
CmR¹      # 5-byte program, but this is equivalent to
CzR⁰⁰²    # 6-byte program using the ¹ shortcut to use the 1st arg twice and implicit 2nd arg
 m        # map over
   ⁰      # the list of the 1st argument
  R ⁰     # by repeating arg1 this number of times;
          # now use the lengths of this list of lists to
C    ²    # cut the list of the 2nd argument
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 5 bytes
```
"@:&)
```
Inputs *B*, then *L*. Displays each sublist on a separate line.
[Try it online!](https://tio.run/##y00syfn/X8nBSk3z//9oIx0FEx0F41iuaCBlqqNgqKMAFDIDM8x1FCyB7FgA "MATL – Try It Online")
# Explanation
```
"      % Implicit input: numeric vector B. For each k in B
  @    %   Push k
  :    %   Range [1 2 ... k]
  &)   %   Two-ouput indexing. The first time this takes as implicit input
       %   the numeric vector L; in subsequent iterations it uses as input
       %   what remains of L. Pushes a smaller vector according to the
       %   specified indices, and another vector with the remaining entries
       % Implicit end. Implicit display stack
```
[Answer]
# [Arturo](https://arturo-lang.io), 36 bytes
```
$[a,b][map b'i[take a i a:drop a i]]
```
[Try it](http://arturo-lang.io/playground?bHfaGV)
```
$[a,b][             ; a function taking two arguments a and b
  map b'i[          ; map over b and assign current elt to i
    take a i        ; the first i elts of a
    a:drop a i      ; assign a sans the first i elts to a
  ]                 ; end map
]                   ; end function
```
[Answer]
# [Nekomata](https://github.com/AlephAlpha/Nekomata), 4 bytes
```
J$ᶻL
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PVI7TkMxEJQoOQWKKB0Jr_9XiLjB0ysCIg0KFAmnoUlBIk5Aw03ouAkzYz9kaZ_tnZ2dHb_3z5en59f99ri9TKv1fjWfzm_H3bpeNre_X9_3H4eHx8O4Ov1c7abokvPOXEYsrrk830zmogvzNXLmKm4DMA3RI3rcEMlMwJd4r5yPKCE8Lpc4F-7wzaRECWky6IrKrTcHJrixgDUJCWqUkOti2Jz1GRkKY6SYhGWDt4iJ4_heUtWoqYCwQkoVV8rUPE1UmbMgF0BRNHOFMAyAXMQ5SQqpydyGM2RqyNXOK--WBUeGIeQM2puYWZEVu6dFO1rkxdDfw0avqi5FKhjT6GeyiwMXVfK9usVtWEucCesHt7-j43qPINeSHj7-W5QBr4vrrksxGdFHynLcZFeTmKoRslr34dgoy-phxdz_tz8)
```
J$ᶻL    Input L and R
J       Non-deterministically split L into parts
 $      Swap to get R
  ᶻL    Check that the length of each part is equal to the corresponding element of R
```
]