[Question]
  [
In this challenge you will take two lists as input and you will *zip* them. The zip can be defined with this recursive expression:
\$
\mathrm{zip}(a,b) = \begin{cases}
\left[\,\,\right] & a = \left[\,\,\right] \\
[a\_0]\mid\mid\mathrm{zip}(b, t) & a = [a\_0] \mid\mid t
\end{cases}
\$
or this Haskell program if you would like:
```
zip [] _ = []
zip (x:xs) ys = x : zip ys xs
```
In simple terms you create a list which alternates between elements of the two input lists, starting with the first element of the first list, then the first element of the second list and so on, until one of the lists doesn't have the next element, then you stop.
For example if we zip `[1,2,3,4,5]` and `[11,12,13]` we get `[1,11,2,12,3,13,4]`. Every element appears in the output except `5`, which is missing because the second list ran out before we reached it.
## Task
As input you will take two lists of positive integers and output the result of *zipping* them as described above. I use the term "first" and "second" when referring to the inputs, but you may take the two lists in the opposite order (although this choice must be consistent, you cannot e.g. swap the order of the inputs depending on what they are).
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the goal is to minimize your source code as scored in bytes.
## Test cases
```
[] [] -> []
[] [1,2,3] -> []
[1,2,3] [] -> [1]
[1,2] [3] -> [1,3,2]
[1,2,3,4,5] [11, 12, 13] -> [1,11,2,12,3,13,4]
[9,9,9] [8,8,8] -> [9,8,9,8,9,8]
[1,2,3] [4,5,6,7] -> [1,4,2,5,3,6]
```
---
As a word of advice if your language has a built-in which solves the task try and solve the task without the builtin and post both solutions as a single answer. It's more interesting to read solutions like that and it will almost certainly be more fun for you to golf.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 32 bytes
```
def f(X,Y):print X.pop(0);f(Y,X)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m728oLIkIz_PaMGCpaUlaboWNxVSUtMU0jQidCI1rQqKMvNKFCL0CvILNAw0rdM0InUiNKHqatLyixQSFTLzork0omN1FKJjNXWALEMdIx1jENdEx1THDJuYjjlE1EAHXW2sFZcC2EqlaCUuhZKiSqs0Da1ETS6F1Irk1IISiHOUYmPylCBugLkZAA)
Ends with an error.
## [Python](https://www.python.org), 35 bytes
```
f=lambda X,Y:X and X[:1]+f(Y,X[1:])
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vwYKlpSVpuhY3ldNscxJzk1ISFSJ0Iq0iFBLzUhQioq0MY7XTNCJ1IqINrWI1oUpTC4oy80o00jSiY3UUomM1NbngAoY6RjrGIFETHVMdMzxSOuYokgY6GDohlsHcBwA)
No error.
# [Whython](https://github.com/pxeger/whython), 33 bytes
```
f=lambda X,Y:[X.pop(0)]+f(Y,X)?[]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m728PKOyJCM_b8GCpaUlaboWNxXTbHMSc5NSEhUidCKtoiP0CvILNAw0Y7XTNCJ1IjTto2OhClMLijLzSjTSNKJjdRSiYzU1ueAChjpGOsYgURMdUx0zPFI65iiSBjoYOiGWwVwHAA)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~6~~ 5 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ζ˜#R`
```
Input-lists in reversed order.
1 byte is added to deal with the edge case of two empty input-lists, which otherwise would result in an empty string. Otherwise the two trailing bytes could have been `н` (pop and push first inner list) instead.
[Try it online](https://tio.run/##yy9OTMpM/f//3LbTc5SDEv7/jzY01DE00jE0juWKNtQx0jHWMdExjQUA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfWVCscvRBf/PbTs9Rzko4b/O/@jo6Fid6NhYHQUww1DHSMcYwoMwYXLGEEmolKGOoZGOoTFMg46JjilExkIHCIHCljpACBECyumY6ZgjDI8FAA).
**Explanation:**
```
ζ      # Zip/transpose the two (implicit) input-lists, with space " " as filler
 ˜     # Flatten this list of pairs
  #    # Split it on spaces
   R   # Reverse the list of lists
    `  # Pop and push the lists to the stack
       # (after which the top list is output implicitly,
       # or the (implicit) input-list if both lists were empty)
```
[Answer]
# [Haskell](https://www.haskell.org), 19 bytes
```
(a:x)#y=a:y#x
o#_=o
```
[Attempt This Online!](https://ato.pxeger.com/run?1=dY9NCoJQFIXnreKAgQVP6L8QXEBrEImX3VLU-8R3o1xLEyfRAlpJw3aTFUEETc7k45yPc7ok2maU501z3svWW1x72j_2nTrQfu0cO8ZZBeZN7rdCp4wAG9NBWaUs6IURHLTh-wiXLLSjKuoDngcm2lhoZiNaUsNYU6z3liB1SYgTijOq2imy7AoyNgdIQqCilBp5asW1oJwKajXPykfZRThUIzV-iSdqqmbRf6Tm33CgfpvvY5_rDw)
[Answer]
# [Prolog (SWI)](http://www.swi-prolog.org), ~~37~~ 28 bytes
*-9 bytes thanks to [@DLosc](https://codegolf.stackexchange.com/users/16766/dlosc)*
```
[H|T]+B+[H|Y]:-B+T+Y.
A+_+A.
```
[Try it online!](https://tio.run/##VUy7CoNAEOzzFWKl3JygeQsRzjQpLC0ixxJsEgSNhwppxF@/rDFFwjI7M8zsmq6t24fsX5W1@jLmJFLBXFAsU5GLIlgpcRMqsLFsSlNX/eDpjJLEy05aIR3PBMUnV9zbrikHz50MnMk4MuE9PV3MLVzJ96G1JmhizBwiwvpjFvVN2DD9BNhgO9dDOGHEWKIjeFgcwPP3hevYYU9EfmDf "Prolog (SWI) – Try It Online")
Port of the Haskell solution.
[Answer]
# [R](https://www.r-project.org), 36 bytes
```
f=\(a,b)if(sum(a))c(a[1],f(b,a[-1]))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=dZA9DoJAEIVj6yUkxGImeRTDnxCjFwGKlWQTCy0UTmODhYfS0zgLEgPRTF6z7337JnO7X7ru0TY2yJ5ruyvJ4MBHS9f2RIa5JlNIBUsHmCKQinnIvhYrSzUxVLytTUO-F-y9oirPPi9HSxAi-uMP3pyXScDZU14QIZx9ghhJ3ybwJFTNEXExcUnR8JfOoePIDDoTKNeXj36srIVIsZnVxGonWpL2xHCn8bZv)
---
Slightly longer, but without recursion:
### [R](https://www.r-project.org), 43 bytes
```
\(a,b,x=rbind(c(a,0),c(b,0)))x[!cumsum(!x)]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=dZDBCoJAEIbp2kuknnZohMbUlLAXUQ-6IXTQgyn4Ll0s6KHqaZp1i3AphmHY_f9v_mUv13a8Vcm97yo3eqwzUWCJQ9KWp-YoJJ82gFKUPACG1JZ9fe5rYQ-Qa-S5WFXsUyaAvSw64VjuwUrzrHFg-ZEIPdz-0bVm8jQzKHnOE27RM5agj8GURmiRx20ipGyknMTmLx0jlyIj5JpBMd-8-8eTORBD3BkxPssBh4QTof9pHPV8AQ)
[Answer]
# [J](http://jsoftware.com/), 19 18 17 16 bytes
```
0(i.~{.]),@|:@,:
```
[Try it online!](https://tio.run/##bY4xb4NADIV3fsVTF4JkUMwdJJzUKlKlTpmyRkxVUMjSpUOkVP3r9BkOyhAZ352fPz98G16KtMNrQArBFoGZF3g/HT@G7aYvfh9Fm8nhJxwkDFly@bx@IU2RB3R22/FEVJRwk76RoJm1Rm01oKzKudFB3CyrCWqwOvj/UY/KrNV6GukG@yUJNmN0LBizn@d0xfl6vYWZ1dglSXK599/c6dyCX/7Gc3yrlOIWIVaR0ElhHQkVxzJi4qUyAxVuylwYtbYaoYSIN8IguhfGRDV8xlz9lo5Sy2428pQr2tTt8Ac "J – Try It Online")
*-1 thanks to ovs!*
Consider `1 2 3 4 f 8 9`:
* `,:` Laminate with 0-fill:
```
1 2 3 4
8 9 0 0
```
* `|:@` Transpose:
```
1 8
2 9
3 0
4 0
```
* `,@` Flatten:
```
1 8 2 9 3 0 4 0
```
* `0(i.~{.[)` Take everything up to the first 0:
```
1 8 2 9 3
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 40 bytes
```
^
;
+`;(\d+),?(.*);(.*)
$1,;$3;$2
,?;.*
```
[Try it online!](https://tio.run/##LYq7CoAwFEP3@x0Vqgbhtj7J4OhPiCjo4OIg/n9tRQ6cEJL7eM5rC5md1rAIpVxp573MMdqqyJkkRkHjaZxgZFVICBQqHLx8Zgr@BTUaqkId1MuACHtE/m@c0aJ7AQ "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
^
;
```
Start with an empty output list.
```
+`
```
Until the first input list is empty, ...
```
;(\d+),?(.*);(.*)
```
... match the first element of the first input list, the rest of the first input list and the second input list, and...
```
$1,;$3;$2
```
... move the first element of the input list to the output list and swap the rest of the first input list with the second list.
```
,?;.*
```
Delete the input lists.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 16 bytes
Anonymous tacit prefix function taking a list of two lists.
```
((>+2×⌊)/≢¨)⍴⍉∘↑
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///X0PDTtvo8PRHPV2a@o86Fx1aofmod8uj3s5HHTMetU38n/aobcKjvqlewf5@QBGNR719j7qaH/WuASo6tN4YqAIoGRzkDCRDPDyDNQ2gag@tUFdQBxnRueBRV9ujrkX/09SjYxWiY9W5IAxDHSMdYwgPwoTJAXlANrKUjomOKUiHoY6hkY4hVMZSBwiBohY6QIhqDlC5jpmOeaw6AA "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 51 bytes
```
sub f(@a,@b){if @a {@a[0],|f(@b,@a[1..*])}else{()}}
```
[Try it online!](https://tio.run/##bYy9CsIwFIX3PkXGRg7FW7UqLnmPkCGBFIQOYnCQmGePp7hElLPc@52fW7wvU63pEdTcGw8TdL7OyniVjbdbhxdxAG8Zho3TJS4p5l6XUi9d8k@2rIN1uv0EI3YN@vxfKSKCnxD2OKwDAhkhrX0GResE6s82i5hwXJ2uvgE "Perl 6 – Try It Online")
[Answer]
# [HBL](https://github.com/dloscutoff/hbl), 6.5 bytes
```
?.(211.'?,(2.
```
The `branch` macro isn't implemented in the online interpreter at the moment, so here's a 7.5-byte equivalent without it:
```
?.(1(1.)('?,(2.
```
[Try it!](https://dloscutoff.github.io/hbl/?f=0&p=Py4oMSgxLikoJz8sKDIu&a=KDEgMiAzIDQgNSkKKDExIDEyIDEzKQ__)
### Explanation
The longer version implements the spec directly:
```
?.(1(1.)('?,(2.
?                If
 .               The first argument is truthy:
  (1               Cons
    (1.)           The head of the first argument to
        ('?        A recursive call with
           ,       The second argument and
            (2.    The tail of the first argument
                 Otherwise, return the first argument (empty list)
```
The `branch` macro (`2`, in golfed HBL) takes several expressions and restructures them into a function call with two arguments. With six expressions, it works like this:
```
(2 a b c d e f)  ->  (a (b c) (d e f))
```
In this case, we have:
```
2 1 1 . '? , (2.)  ->  (1 (1 .) ('? , (2.)))
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 32 bytes
```
f=->a,b{r,*a=a;r ?[r,*f[b,a]]:a}
```
[Try it online!](https://tio.run/##KypNqvz/P81W1y5RJ6m6SEcr0TbRukjBPhrITItO0kmMjbVKrP1foJAWHW2oY6RjrGOiYxqrE21oqGNopGNoHBvLhZADigNldcx0zGHCIJVgmdj/AA "Ruby – Try It Online")
[Answer]
# [Desmos](https://desmos.com/calculator), 139 bytes
```
l=[1...a.length+b.length]
g(A)=join(A,0l)[ceil(l/2)]
L=\{\mod(l,2)=1:g(a),g(b)\}
f(a,b)=\{a.\length=0:a,L[1...\min(\{L=0:l,l.\max+1\})-1]\}
```
Holy crap, it took me forever for me to get an actually working solution for this challenge in Desmos. I don't know if I'm severely overcomplicating this or what, but I got it to work so...
¯\\_(ツ)\_/¯
I'll see if I can golf this some more later, too tired to think about this right now :P
[Try It On Desmos!](https://www.desmos.com/calculator/gooyj6brzs)
[Try It On Desmos! - Prettified](https://www.desmos.com/calculator/xskbanqi0p)
[Answer]
# [Curry (PAKCS)](https://www.informatik.uni-kiel.de/%7Epakcs/), 21 bytes
```
(a:b)#c=a:c#b
[]#_=[]
```
[Try it online!](https://tio.run/##Sy4tKqrULUjMTi7@/z86VjneNjqWSyPRKklTOdk20SpZOel/bmJmnoKtQkFRZl6JgopCtKGOkY5xrIIykGUCZPwHAA "Curry (PAKCS) – Try It Online")
The Haskell answer almost works in Curry, but because of non-determinism it matches any prefix of the result. We can restrain it by adding two more bytes.
[Answer]
# APL+WIN, 27 bytes
Prompts for two lists as a nested vector
```
(^\0≠v)/v←,⍉⊃(⌈/⍴¨v)↑¨v←,¨⎕
```
[Try it online! Thanks to Dyalog APL Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcQJanP5BlyPWooz3tv0ZcjMGjzgVlmvplQEGdR72dj7qaNR71dOg/6t1yaEWZ5qO2iUAKJHdoBVDvf6Aurv9pXBqPetdoggkuGMdQwUjBGMyFsOCyQK6mBpKMgomCKVC5oYKhkYIhRNxSAQg1NSwUgBDZCKBKBTMFc00A "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 13 bytes
```
ＵＭθ⮌ιＷ§θⅉ⟦Ｉ⊟ι
```
[Try it online!](https://tio.run/##FcqxCoMwEADQvV@R8Q6uw2k7ORWnDgXpVo4MhwYMxERjsP37FOf3xlnzmDTU@tK1T8uicYKNzNsdLu8OPGJ3@c4@OAOP8oyT@538AUQ0Q/axgPS6FxjSemaLXa0iwtRQSze6WxJm4oa4tdbW6xH@ "Charcoal – Try It Online") Takes input as a pair of lists. Explanation:
```
ＵＭθ⮌ι
```
Reverse each of the two lists.
```
Ｗ§θⅉ
```
Cyclically index the lists according to the number of values already output and repeat until that list is empty.
```
⟦Ｉ⊟ι
```
Output the "next" value from that list on its own line.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 5 bytes
Uses Kevin Cruijssen's method from their [05AB1E answer](https://codegolf.stackexchange.com/a/244065/53748).
```
z⁶FḲḢ
```
A monadic Link that accepts a pair of lists, `[a, b]`, and yields a zipped list.
**[Try it online!](https://tio.run/##ASkA1v9qZWxsef//euKBtkbhuLLhuKL/w4fFkuG5mP//W1s5LDgsN10sWzRdXQ "Jelly – Try It Online")** Or see the [test-suite](https://tio.run/##y0rNyan8/7/qUeM2t4c7Nj3csei/zuH2o5Me7pzxqGmNZhaQeNQwR0HXTuFRw9zI//@jo6NjdaJjY7l0wAxDHSMdYwgPwoTJAXlANrKUjomOKUiHoY6CoREQQ@UsdYAQKG6hA4SoJgE16JjpmAMFYwE).
### How?
```
z⁶FḲḢ - Link: pair of lists [a,b]
 ⁶    - space character
z     - transpose [a,b] with space-filler
  F   - flatten
   Ḳ  - split at spaces
    Ḣ - head
```
[Answer]
# [Factor](https://factorcode.org/), ~~43~~ 39 bytes
```
[ f pad-longest vmerge { f } split1 . ]
```
[Try it online!](https://tio.run/##bZFdS8MwFIbv8ytedt/UVt2XKAh@3kxwejU2CNlpU2ybmMS5Mba/XtMOkeHOS@DkOS/nkJxMSK9t8z59njyO4ejzi2pJjtPaW@EgnNPSoRJe8RW1VvdngjNl4X1R5zCWvN8YW9QehcYVY1uGENugXXd2R/cEKc6P6C/Z/qMtO@W9wOWhV4IkRXJsGXVqy8NOp0e1LfoYdNUda2bIYMQyKnWdk/NYVWRzCr4sOLrHJuCYN9nhX24qYVgvivb7/XWIxWIxu5/c4eUBb6@306d5AC0P5ShiUyIo740bx7HUS8p1mXHnhfygtVQiDORSV7GI0/RsOOzHo8Eo6SPTFqIGrU0pauELXUNn@FYbeFU4tDtSCIkiS7zHDgvgzQ8 "Factor – Try It Online")
## Explanation
```
                ! { 1 2 3 4 5 } { 11 12 13 }
f               ! { 1 2 3 4 5 } { 11 12 13 } f
pad-longest     ! { 1 2 3 4 5 } { 11 12 13 f f }
vmerge          ! { 1 11 2 12 3 13 4 f 5 f }
{ f }           ! { 1 11 2 12 3 13 4 f 5 f } { f }
split1          ! { 1 11 2 12 3 13 4 } { 5 f }
.               ! { 1 11 2 12 3 13 4 }
```
[Answer]
# JavaScript (ES6), 33 bytes
```
f=([v,...a],b)=>v?[v,...f(b,a)]:a
```
[Try it online!](https://tio.run/##dY9NDoIwEEb3noJlm4wlw59igh6EdFEQjIRQI4br1yl1oWHsZBZt35uvHcxi5vZ5f7z2k712zvWVqBdQShkNjazOyyVse9GAkfpkXGun2Y6dGu1N9KLWENVayohZcUxXO4ZHSCDdSiwfWDbE88gJHmfmBwFSAtgUyCBfn4cQYUK9zggSegI9hMRt/BKovHsEqp9o75d0@un/H6R0KODwJYfojICcggvt3g "JavaScript (Node.js) – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 5 bytes
```
↑_ΣT0
```
[Try it online!](https://tio.run/##yygtzv5/aFvuo6bG/4/aJsafWxxi8P///@jo6Fid6FggBtGGOkY6xmAOkAWk4GwdYx0THVOQCkMdQyMdQ4iEpQ4QAhkWOkCIUApkABXrmOmYx8bGAgA "Husk – Try It Online")
Input is list of the two lists.
`T`ransposes using `0` to fill shorter rows, flattens (`Σ`) the result, and `↑` takes the longest prefix with all elements that are truthy using the function `_` (=negate; it would have been more-intuitive to use the `I`dentity function here, but for reasons that I don't understand this doesn't seem to work).
Pretty-much the same approach as [Kevin Cruijssen's answer](https://codegolf.stackexchange.com/a/244065/95126) but independently found.
Note that the [Husk](https://github.com/barbuz/Husk) interpreter will not accept input consisting of only empty lists, presumably since it's unable to infer their type. The TIO link above successfully runs all the test cases (including the first, only-empty-lists one), since these are grouped together and run side-by-side, allowing the interpreter to infer that all lists are of numbers; but it fails when given the first test case on its own. I can't currently see a way to avoid this.
[Answer]
# x86 machine code (32-bit), 39 bytes
```
\x31\xC0\x89\xC5\x55\x87\x2C\x24\x39\xCD\x74\x19\xFF\x34\xAE\x8F\x04\x87
\x45\x40\x87\x2C\x24\x39\xD5\x74\x0A\xFF\x34\xAB\x8F\x04\x87\x45\x40\xEB
\xE0\x5D\xC3
```
[Try it online!](https://tio.run/##lVJtT9swEP6c/IqbEcKGFBLaDljpJGhB4suGgE9rqijkhVoKSZQ4LKPqX193Z5dSNgkxyYnvHj/33IsddR6iaLkl8yhr4gROaxXLYn/2dRkEoVKVvG9UEgSc10mkZJFztq@SVjEhBESzsILgWZaTqW0Ngflt1/Pbkeu3xye49/22j9/xkd8ejvDr4TnhY789QttD@/ISMbTPLpCHttsjPrMtILUeRvfcfxXGfaPgnm0onG8qvMZenL@oXaDXx9yjLhssaxUqGYHMFWD9nPbduFaORnbrKnKNmSW5@wp6a9ATMLctcqqBbeGo6scggKciQ9ksAW5bFiubegbb28l96ee@YgRFYZbpia2RsigNh7wvwIYh45Uw9phxrEk4wG4Zp5rIjBinosi816hHZqxRDwMF1lMlqqlyKm1h26tWnwoZQ1lhyWFVhb9My2iuW9IdlY2iW@U78x0SSosKNFPCENwBbqdEHcDentR8SyumnG3HzAGUm8gpBVoyxUD4NCQ6dMDMy7JSTFBzpOLCl1Y0SrMXNq3V4cLPN0@xha04SWWewI@r6@D65urbHR/f3jlwezNy9R/V4wLmvrkRyjjU17rBquVzUqScHAEH0DNxm7incTFAlY0xaQmaDuIL@DnTt@sK26ZMj6HMuZnbyxgaU7xRpZsWuvuBKS2ceK47Ree1k9ABrkc8mYr5Qrz1xEep2MmhA913I9acD@dYRTg0rv5fCfHMw0Pv/ZwnDtB6G3vsAK3/L5bKcOCzA0cmdvXOXXwky99RmoUP9bLz2D1cdr53/wA)
The algorithm is quite straightforward, but 32-bit x86 *really* needs more registers. Some ugly stack hacks are used to cope with the lack of registers.
The test cases in TIO relies on a GCC extension supporting C arrays of length 0. ISO C and C++ forbid 0-length arrays.
Since OP didn't specify the upper bound of integers, I tried to find some clever way using an array of bytes, and interleaving them with [`pdep`](https://www.felixcloutier.com/x86/pdep) or some SSE shuffle instruction, but that ended up using too many bytes.
```
# edi: dst, esi: arr0, ecx: len0, ebx: arr1, edx: len1
# eax: return, ebp: clobber
0:  31 c0                   xor    eax,eax
2:  89 c5                   mov    ebp,eax
4:  55                      push   ebp
5:  87 2c 24                xchg   DWORD PTR [esp],ebp
8:  39 cd                   cmp    ebp,ecx
a:  74 19                   je     0x25
c:  ff 34 ae                push   DWORD PTR [esi+ebp*4]
f:  8f 04 87                pop    DWORD PTR [edi+eax*4]
12: 45                      inc    ebp
13: 40                      inc    eax
14: 87 2c 24                xchg   DWORD PTR [esp],ebp
17: 39 d5                   cmp    ebp,edx
19: 74 0a                   je     0x25
1b: ff 34 ab                push   DWORD PTR [ebx+ebp*4]
1e: 8f 04 87                pop    DWORD PTR [edi+eax*4]
21: 45                      inc    ebp
22: 40                      inc    eax
23: eb e0                   jmp    0x5
25: 5d                      pop    ebp
26: c3                      ret 
```
[Answer]
# [PARI/GP](https://pari.math.u-bordeaux.fr), 38 bytes
```
f(a,b)=if(a,concat(a[1],f(b,a[^1])),a)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XU_LCsJADPyVpQfZhelh66s96I8sUdLCSqHUpdSD3-KlIOI3-Tdm2yoigWSGmQnJ7Rm4q4-nMAyPS-_T_LXwmlGaXR1ndW4r7jU7S_C6BLuDJWPAZnbfOYTmqlmlexW6uhWvSiJJVMVNoz0Ui18550g6xTYiiwzLiU7wqwqN81fECusxZGEz2FkqIBVRDqm_XZLABlsimk_9PPgG)
`a[^1]` means skiping the first item in `a`.
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 27 bytes
```
read x<$1&&echo $x&&f $2 $1
```
[Try it online!](https://tio.run/##lY/bboMwDIbv8xSeloVGC@ocDi0S7HKXe4G2k9gGajWpqwrSIlGenTlAUTfaHWSC4t@ffzvPabFu8omsmn2WvoKJOQqRvazfgRshcuAaODY1u4ZdWpQZJSQd0o83cCpzmzw@JAnWJtZCXE2fluW02u032xL4Xe0cug63YCyHeNIWcnBuiuXWAQQNnhzJkWTtcNf90kMl@S39C3c66ix/YZeL/gM/nvL7BPAhOLMdAmrAH9sjG@PWuY1/PayTaQ8IYSYZy8ymZIsV0Ofe07@9o9LKG4Q@6wnsFMp7ApVHaY8pXwXWABW9ic7AoC2jJZAgwiNFQehcUXRURNf@nIwlRxWq2dHIJzkgm3DVfAI "Bash – Try It Online")
Port of pxeger's [python solution](https://codegolf.stackexchange.com/a/244055/15469) to Bash.
Input lists are taken as files (one entry per line). Output is one entry per line. Output contains extra blanks, which may be illegal and could be fixed at the price of some bytes, but I liked the simplicity of the translation.
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 45 bytes
```
param($a,$b)for(;$a){$h,$t=$a
$a,$b=$b,$t
$h}
```
[Try it online!](https://tio.run/##bVBNS8MwGL73VwQJ0sDbQ/elYxSqRQ9eFLebiGRdSpVtqUmmwtbfXt8k7TY3ExKS5ytPW8lvoXQplssol0o0tEi2TcUVX4WUA52zQqpwQjnb0hKoSSgPHJ7QOV4DWtZNHQRpGBAcaZiGDEi3MfiLxtCD/hl1hDrRCefAfuvv4/3UCgMYejoGEvdwderY8rGVxKg6No4Bp1NdA053GuOpXf/Xw3dgBFdt@ADxIUaPGAsY2ZF7qe54XkaP8w@RG7J1AbR4V9oAoVrkcr3Ag/ipkBYLkhD6NvEiJfRmaRC5pEVr6RxeYIQ2GdcCJakPtuPGZjj1ZI/dWsxbPVi7/eVpmm20kSvf7vUoZbrJc6E1@sKuyI5kcv0llJnJ6EHLNSOR@ER63/1McChwMcOuxJa9sFX2zU8tJMrkqsIH9cH73P2Htkj3BXXQ/AI "PowerShell Core – Try It Online")
One test case returns `1` instead of `[1]` as PowerShell tends to flatten arrays
*-1 byte thanks to [mazzy](https://codegolf.stackexchange.com/users/80745/mazzy)*
[Answer]
# [Julia 1.0](http://julialang.org/), 25 bytes
```
a^b=@show(a[1])b^a[2:end]
```
[Try it online!](https://tio.run/##VY7bbsIwDIbv@xS@TCSvksthYxITL7AnqApyIRNBUajSMODpi7OGw@Iksn9/@Z3DyVmmyzDwul2u@v3xrLimRrdrrqtP43fN8HMMYMF6CIZ3znrTK12ALMYWN2hgCX3nbFT2KSfR/LIr1beJXHYcelMq9dfSeuS6YH10/v4shivIJ2DLcbuHDcjsf5guRBnqBmS/fcldpJywwslDyFUmaFSkzgThRMqM4RRnyYCQKqQHQalJqU@CCLxACQE/UGKkFpLm8zJU/HCO73ejqcgzsZk3Nw "Julia 1.0 – Try It Online")
prints the values and ends with an error
# [Julia 1.0](http://julialang.org/), 30 bytes
```
>(b)=[]
>(b,a,A...)=[a;A>b...]
```
[Try it online!](https://tio.run/##XY1rasMwEIT/@xT7U4KtYPNqQ7EgB@gJgilrooKKUIztlt7eHcVqWqrVY2f2Y/T@kaLK17J409v23DV4WfnknIPU55Pv0XbL23WkSDHTGPSSYg6TsQ1hKff8yoFamoYUZxN/7WKGT03OvIRZ3aDjFJwxt5G1KzeMMc8p31xLrSfTey2f/xtXl1pE2ibky3LuCPvB425KL7zh7d2oqhKyOtCVEN5CVox3vC8BwrJhuRNShlLmAgTwkVEAnxi1Uke09fz5FHl84MefoB3sPWIO3Tc "Julia 1.0 – Try It Online")
expects `b>a...`, returns an actual list
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 68 bytes
Takes `0`-terminated arrays as input.
```
f(a,b)int*a,*b;{for(;*a;!*b?a=b:b++)printf("%d %d "+3*!*b,*a++,*b);}
```
[Try it online!](https://tio.run/##hVHJTsMwEL37K4YgJHsyINKym5QfqLhxqirkhUAkSFDacon87cFOoERJVGRbtuctHuuZ01djmibjirTIiy0qQi3rrKy4RCWPUD@oVN/pOBaflcczHp1Y8DOK5@hRQhXHXiKka47zwrzv7Avcb7Y2L8/eFox9lbmFVvmsqor7HVAJqBnA7xvCnwF67lFrKiRzjAXBh8oLHow6XeexWqd1Kwyeq7Wozx0dvCc0ozlNVaeZF3Q5Qm4pjMPOj0/LpT84AtT/Njnd1PA@0XZCyYySMXBDYQyr4S9XdD3uEdH4ZSX7ycOkimyqJaCRYHyy1gcB9V9CbYpofDj90AiifqUj2QEJ0sWelvHw8J6x22541GGOueYb "C (gcc) – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 6 bytes
```
Zf0€÷^
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCJaZjDigqzDt14iLCIiLCJbMTEsMTIsMTNdXG5bMSwyLDMsNCw1XSJd)
Looks like 05AB1E beats Vyxal this time. Takes input in reversed order.
```
Zf0€÷^ # Leaving out this comment makes the explanation kinda feel empty
Z      # Zip the lists
 f     # Flatten
  0€   # Split on 0
    ÷  # Push every item
     ^ # Reverse the stack
```
# [Vyxal](https://github.com/Vyxal/Vyxal), 6 bytes
```
Zf:0ḟẎ
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCJaZjow4bif4bqOIiwiIiwiWzExLDEyLDEzXVxuWzEsMiwzLDQsNV0iXQ==)
A slightly different approach. Still 6 bytes.
```
Zf:0ḟẎ # Leaving out this comment makes the explanation kinda feel empty
Z      # Zip the lists
 f     # Flatten
  :    # Duplicate the top of the stack
   0ḟ  # Index of the first 0
     Ẏ # Take everything up until that index
```
# [Vyxal](https://github.com/Vyxal/Vyxal), 5 bytes
```
Zf0€h
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCJaZjDigqxoIiwiIiwiWzExLDEyLDEzXVxuWzEsMiwzLDQsNV0iXQ==)
Takes input in reversed order. Returns 0 for the case of 2 empty lists, so does not meet the spec.
```
Zf0€h # Leaving out this comment makes the explanation kinda feel empty
Z     # Zip the 2 lists
 f    # Flatten them
  0€  # Split on 0
    h # Get the first item
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-g`](https://codegolf.meta.stackexchange.com/a/14339/), 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
íV c óÏ
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LWc&code=7VYgYyDzzw&input=WzEgMiAzIDQgNV0KWzExIDEyIDEzXQotUQ)
```
íV c óÏ     :Implicit input of arrays U & V
íV          :Interleave U with V, padding V with null
   c        :Flatten
     ó      :Partition before elements
      Ï     :That are falsey
            :Implicit input of first element
```
## 5 bytes
By taking input as a 2D array, with the order reversed.
```
ÕcÔóÏ
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LWc&code=1WPU888&input=WwpbMTEgMTIgMTNdClsxIDIgMyA0IDVdCl0KLVE)
```
ÕcÔóÏ     :Implicit input of 2D array
Õ         :Transpose, padding the first array with null
 c        :Flat map
  Ô       :Reverse
   óÏ     :As above
          :Implicit input of first element
```
[Answer]
# [Vyxal 3](https://github.com/Vyxal/Vyxal/tree/version-3), 5 bytes
```
Zf0sh
```
[Try it Online!](https://vyxal.github.io/latest.html#WyIiLCIiLCJaZjBzaCIsIiIsIlszXVxuWzEsMl0iLCIzLjQuMCJd)
takes input in reverse order
[Answer]
# [Arturo](https://arturo-lang.io), 42 bytes
```
f:$[a,b][([]=a)?->a->@[a\0]++f b drop a 1]
```
[Try it](http://arturo-lang.io/playground?MkTYyC)
```
f:$[a,b][          ; a function f taking two lists a and b
  ([]=a)?          ; is a empty?
  ->a              ; if so, return a
  ->               ; otherwise,
    @[a\0]         ; the first element of a as a list
    ++             ; concatenated with
    f b drop a 1   ; the result of calling f with b and a without its first element
]                  ; end function
```
[Answer]
# [Uiua](https://uiua.org), 9 bytes [SBCS](https://www.uiua.org/pad?src=0_7_1__IyBTaW5nbGUtYnl0ZSBjaGFyYWN0ZXIgZW5jb2RpbmcgZm9yIFVpdWEgMC44LjAKIyBXcml0dGVuIGhhc3RpbHkgYnkgVG9ieSBCdXNpY2stV2FybmVyLCBAVGJ3IG9uIFN0YWNrIEV4Y2hhbmdlCiMgMjcgRGVjZW1iZXIgMjAyMwojIEFQTCdzICLijbUiIGlzIHVzZWQgYXMgYSBwbGFjZWhvbGRlci4KCkNPTlRST0wg4oaQICJcMOKNteKNteKNteKNteKNteKNteKNteKNteKNtVxu4o214o21XHLijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbXijbUiClBSSU5UQUJMRSDihpAgIiAhXCIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX7ijbUiClVJVUEg4oaQICLiiJjCrMKxwq_ijLXiiJril4vijIrijIjigYXiiaDiiaTiiaXDl8O34pe_4oG_4oKZ4oan4oal4oig4oSC4qe74paz4oeh4oqi4oeM4pmtwqTii6_ijYnijY_ijZbiipriipviip3ilqHii5XiiY3iip_iioLiio_iiqHihq_imIfihpnihpjihrvil6vilr3ijJXiiIriipfiiKfiiLXiiaHiip7iiqDijaXiipXiipziipDii4XiipniiKnCsOKMheKNnOKKg-KqvuKKk-KLlOKNouKsmuKNo-KNpOKGrOKGq-Kags63z4DPhOKInuK4ruKGkOKVreKUgOKVt-KVr-KfpuKfp-KMnOKMn-KVk-KVn-KVnCIKQVNDSUkg4oaQIOKKgiBDT05UUk9MIFBSSU5UQUJMRQpTQkNTIOKGkCDiioIgQVNDSUkgVUlVQQoKRW5jb2RlIOKGkCDiipc6U0JDUwpEZWNvZGUg4oaQIOKKjzpTQkNTCgpQYXRoVUEg4oaQICJ0ZXN0MS51YSIKUGF0aFNCQ1Mg4oaQICJ0ZXN0Mi5zYmNzIgoKRW5jb2RlVUEg4oaQICZmd2EgUGF0aFNCQ1MgRW5jb2RlICZmcmFzCkRlY29kZVNCQ1Mg4oaQICZmd2EgUGF0aFVBIERlY29kZSAmZnJhYgoKIyBFeGFtcGxlczoKIwojIFdyaXRlIHRvIC51YSBmaWxlOgojICAgICAmZndhIFBhdGhVQSAi4oqP4o2PLuKKneKWveKJoOKHoeKnuyziipdAQi4iCiMgRW5jb2RlIHRvIGEgLnNiY3MgZmlsZToKIyAgICAgRW5jb2RlVUEgUGF0aFVBCiMgRGVjb2RlIGEgLnNiY3MgZmlsZToKIyAgICAgRGVjb2RlU0JDUyBQYXRoU0JDUwo=)
```
↙⊗0.♭⍉⬚0⊟
```
[Try it!](https://uiua.org/pad?src=0_7_1__ZiDihpAg4oaZ4oqXMC7ima3ijYnirJow4oqfCgpmIFtdIFtdCmYgW10gWzEgMiAzXQpmIFsxIDIgM10gW10KZiBbMSAyXSBbM10KZiBbMSAyIDMgNCA1XSBbMTEgMTIgMTNdCmYgWzkgOSA5XSBbOCA4IDhdCmYgWzEgMiAzXSBbNCA1IDYgN10K)
Port of Jonah's [J answer](https://codegolf.stackexchange.com/a/244077/97916).
]