[Question]
  [
[`zipwith`](http://zvon.org/other/haskell/Outputprelude/zipWith_f.html) is a functional construct that takes three arguments: one binary function and two lists of the same length, and returns a single list where each element is constructed by applying the binary function to each pair of elements from the two lists:
```
zipwith (a+b) [1,2,3] [4,5,6] = [5,7,9]
```
You are to take a [black-box function](https://codegolf.meta.stackexchange.com/a/13706/66833) which takes exactly two arguments and two non-empty arrays of the same length consisting of positive integers, and output the result of applying `zipwith` to this function and arrays.
For the sake of simplicity, you can assume that the black-box function will always input and output integers within your language's integer domain.
If your answer consists solely of a builtin which does this (for example Haskell's `zipWith`), please edit into [this](https://codegolf.stackexchange.com/a/218018/66833) Community Wiki answer. You may input and output in any [convenient method](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods).
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the shortest code in bytes wins
### Test Cases
```
function, array, array -> output
a = b, [1, 2, 3], [3, 2, 1] -> [0, 1, 0]
a - b, [8, 3], [3, 8] -> [5, -5]
a² + b/2, [6, 8, 1, 3], [5, 3, 6, 2] -> [38, 65, 4, 10]
a × φ(b), [4, 2, 5, 8, 3], [7, 6, 10, 2, 1] -> [24, 4, 20, 8, 3]
```
The third test case uses integer (floor) division. The fourth uses the [Euler Totient function](https://en.wikipedia.org/wiki/Euler%27s_totient_function)
  
[Answer]
# [Haskell](https://www.haskell.org/), 22 bytes
```
(.zip).(.).map.uncurry
```
[Try it online!](https://tio.run/##jZFNb4JAEIbv@yvegwdQdiP4WRN6bNJDb02alG7iClvdFJAgtNqmv50O@FFNNMphZnd553l3dhZq9aHjuEqWURlrPCmT4muhc81@eGWJb5PZwhK2SFQmyjQs83xT8V@WbF5N9mKKBSYTWAr8HrM6hHYdAyWbNNumUB7pfZynMlYsC6PToiY@UqJKSofTNVXGOp0TooV3Exc6h2X5vmtDYB5GWNsIXCHWkrGk7sJHtGRAlhuqbuH/BlanVjrwHPQkgr6DgYOhxPWPcwSkHTm4k@fRvn/C7jUrV96GflDxSjt4zkuKzeaCCyeT8cFhfMvVTxrggwvgN7Udo2ordGg5jcznFB7ZDcmHOtmaEoJ86ciTR@AeCYb0ix7U7V4zQBv7yc7sZgheM4ddW6MG73YP71cbeP0G7nV3suoP "Haskell – Try It Online")
Not particularly interesting, just a reimplementation of `zipWith` converted to pointfree form:
```
\f x y -> map (uncurry f) (zip x y)
\f x -> map (uncurry f) . zip x
\f x -> (map (uncurry f) .) zip x
\f -> (map (uncurry f) .) . zip
\f -> (. zip) (map (uncurry f) .)
\f -> (. zip) ((.) (map (uncurry f)))
\f -> (. zip) ((.) ((map . uncurry) f))
\f -> (. zip) ((.) . (map . uncurry) $ f)
\f -> (. zip) . ((.) . (map . uncurry)) $ f
(. zip) . ((.) . (map . uncurry))
```
[Answer]
# Trivial builtin answers
Edit your answer into this post if it consists of a builtin which does the entire task by itself
---
# [HBL](https://github.com/dloscutoff/hbl), 0.5 [bytes](https://github.com/dloscutoff/hbl/blob/main/docs/codepage.md)
```
2
```
(Not implemented in the online version at the time of this writing.)
# [Fig](https://github.com/Seggan/Fig), \$1\log\_{256}(96)\approx\$ 0.823 bytes
```
z
```
[Try it online!](https://fig.fly.dev/#WyJ6IiwiIl0=)
Same as Husk.
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 1 byte
```
¨
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R2wSF6ke9uxRsFR71bq1VeNTdovCobypIWMNQR8FIR8FYUyHt0AoFDWMwz1CTC6FHF1OPBYoGC5hqDaByLSNNBW2FRz1dQE2Htxuh6jMDKgaajtBtCmTqKACFjTS5Du8AqdHWN7R91LXoUceKR72bgTbPVXAtzUktUi9WKMkvyUzNK1FIK81LLsnMz0Ny4uHpCod3YDrTBOwZU7ClMBvNwdYZGkD9@f8/AA "APL (Dyalog Unicode) – Try It Online")
# [BQN](https://mlochbaum.github.io/BQN/), 1 byte
```
¨
```
Same as APL. [Try it at BQN online!](https://mlochbaum.github.io/BQN/try.html#code=4oCiU2hvdyAx4oC/MuKAvzMgPcKoIDPigL8y4oC/MQrigKJTaG93IDjigL8zIC3CqCAz4oC/OArigKJTaG93IDbigL844oC/MeKAvzMgeyjwnZWo4ouGMikr4oyKKPCdlanDtzIpfcKoIDXigL8z4oC/NuKAvzIKQA==)
# [Husk](https://github.com/barbuz/Husk), 1 byte
```
z
```
[Try it online!](https://tio.run/##yygtzv7/v0r7////0YY6RjrGOiaxQJaBjpGBjrGBjolBLAA "Husk – Try It Online")
# [Jelly](https://github.com/DennisMitchell/jelly), 1 byte
```
"
```
[Try it online!](https://tio.run/##y0rNyan8/19b6f///9GGOkY6xjomsf@jTXXMdMx1LGIB "Jelly – Try It Online")
# [J](http://jsoftware.com/), 2 bytes
```
"0
```
[Try it online!](https://tio.run/##ZY89C8IwFEX3/IqLg/2wCUlsaw0KBcHJyVUcWimog0VoJ8W/Hl@bQisG8kHuOXkvdzsTXoutgYcIEoYmF9gdD3s7kzZgrOjCEyu77cyaurlVj4bOPsfHBHPxNIxVl2sNBY0lxuGTiTJoJ1eUayiHZz9wj/N/PHNwSriaCH5o8gILbETOTe6shPIU2gkxFUomNej1EEPzA48V4UqOHbkPxOSllJEj8UKBt6AlGlpb91bSc9p@AQ "J – Try It Online")
Not technically a builtin, but close enough.
# [C#](https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip), 3 bytes
```
Zip
```
[Try it online!](https://tio.run/##VY47C8IwFIX3/IqDU4sx4HMJdekmOnUQFIdYgwRqUpO0IqW/vV7UQS8X7uPA@U4ZJqXzemiCsVcUzxD1TbLfS2yNvUvG6uZcmRIhqkijrFQIyFnHgH@ldeaCnTI2SUnrBlC1ysPr0FQRGax@HE/ophwzjnkvDqZOvr8Fx5Jj1XMkiuOcIltDYUybfPvkzgZXabH3JmrKpZMieooqNo54Iw7qDydNJdF71g8v "C# (.NET Core) – Try It Online")
# [Julia](http://julialang.org/), 3 bytes
```
map
```
[Try it online!](https://tio.run/##VY1RCsIwEET/9xTzmWAaaIvSn3iREiHFBiI1ljaCN/MAHixuiiDdn5l9O8PenlNw9St7k@9uzmlc0wqDnoQxCn2t0Ci0lm272dpKEhWv3R93hQmnBonqDHdpcMDweXO6P/GVS7/skVWBWcMNS@QfC8pHhLjpSuCZlxDTFEUhckf8xrTWcs8ljfGavw "Julia 1.0 – Try It Online")
# [Python 2](https://docs.python.org/2/), 3 bytes
```
map
```
[Try it online!](https://tio.run/##bY7BCsIwEETv@Yo9NnGLNEUphXxJ3MMGLQq2DU0ufn3cFMGD7mWW4c0w8ZXv62LL5C5l5ljyLeUEDrwCOf/kOVwZGMMIjyU37FzQCL5DsAg9ydvvb0eEvxFugxDDlxz@Y8ZYOEA4SpE/CyV9n8xJFEE8S6RIqWndoG6UNbumUeriVrdNjamO1uUN "Python 2 – Try It Online")
# [R](https://www.r-project.org/), 3 bytes
```
Map
```
[Try it online!](https://tio.run/##K/pflVlQnlmSYfvfN7Hgf2leTmZxiQZUTCPB1jZBx9DKWMfYylBTkwtdVjdBJ1nDQsdYE0gZ61hoYipJK81LLsnMz9NI1EnSrE7Lyc8v0kiMM9JO0jfSrAXqMtNRsNBRMNRRAJthCqR1FIBiRkCj/gMA "R – Try It Online")
The canonical [R](https://www.r-project.org/) built-in function is [mapply](https://tio.run/##K/pflVlQnlmSYfs/N7GgIKcSxtdIsLVN0DG0MtYxtjLU5IKL6iboJGtY6BhrAiljHQtNhFRaaV5ySWZ@nkaiTpJmdVpOfn6RRmKckXaSvpFmLVC1mY6ChY6CoY4CWK8pkNZRAIoZaWr@BwA) (6 bytes).  
However, the [R](https://www.r-project.org/) documentation for `Map` reads *"Map is a simple wrapper to mapply which does not attempt to simplify the result"* (meaning that `Map` leaves its output as a list, rather than a vector, of results), so this seems to be a perfectly-acceptable 3-byte alternative here.
# [Factor](https://factorcode.org/), 4 bytes
```
2map
```
[Try it online!](https://tio.run/##VY29DoJAEIR7nmJ6IwYQQjTWxsbGWBGLCy6RyP1wdxTG@OzncqGh2Z3MfDvbidZrG@63y/V8wJusogGOxolUSw5S@FccaTep1vdaOSghyRkxx8aS9x9je@VxTELAFxlyFPix2qNExarBBg/kUhikyYooWGWROK2IOuaIRB1Vg@2KqNjPlpaSd8VNc08DNzL47A0bO3SD1ja@X27DHw "Factor – Try It Online")
# [Raku](https://github.com/nxadm/rakudo-pkg), 4 bytes
```
&zip
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtfrSqz4L81V3FipUKahlV5ZkmGhtahTQraCloKKZllCkaaOgoaZjoKFjoKhjoKxiCeKZDWUQCKGWlqWv8HAA "Perl 6 – Try It Online")
# [Haskell](https://www.haskell.org/), 7 bytes
```
zipWith
```
[Try it online!](https://tio.run/##bcuxDoIwFIXhvU9xEhxAbmPaStOF53AgHUjU0IhAgKFofPbaGAaHTmf4v9O1y@PW9@HNw8tNF7d2gX8Y89mGGv7oUeLej@OMfDvJgrFn64ZYriMDptkNKw7Yj8jLAo0gScqiOVNF2qZUXf8xFVckGY/K7MYkRRaFJkPipypSpEna8AU "Haskell – Try It Online")
# [Prolog (SWI)](http://www.swi-prolog.org), 7 bytes
```
maplist
```
[Try it online!](https://tio.run/##KyjKz8lP1y0uz/xvr5ucmJOj8T83sSAns7jkv45CQU5psY5CtKGOkY5xLJBhomOqYwZkRGnqKJQXZZak5uRpRGnq/QcA "Prolog (SWI) – Try It Online")
# MATLAB / Octave, 8 bytes
```
arrayfun
```
[Try it online!](https://tio.run/##y08uSSxL/Z9m6xDzP7GoKLEyrTTvf5qGQ0FOabGOQrShjoKRjoJxLJBpoqNgqqNgFqvJBZROLUSVBDJNQEzN/wA "Octave – Try It Online")
# Elm, 9 bytes
```
List.map2
```
# [PHP](https://php.net/), 9 bytes
```
array_map
```
[Try it online!](https://tio.run/##hc5BCoMwEAXQvaeYRRaJjSTGKoJNexAJkrSIi6ohYKGnT4dAcdNiVkP@8P74ycfLzU8@I@O23EFDtCHY9zBbH7sse9kwPLbZ0xRTGBdKLCeO6SuxWhPHoS85KA6VwbFKY2mAsQ5@PCF6iTkHaQ7sItHt7rZ/0d2uORT1kZzn6jQ@1zVQ4oRiqDeop6tSFyJYh3/q24hyhQsNJmfckyZ@AA "PHP – Try It Online") (PHP's `array_map` can take any number of array arguments)
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 9 bytes
```
MapThread
```
[Try it online!](https://tio.run/##Vc29CsIwFAXgvU8RCHTxFk1qa5dKF92Egm6lwqWmpNAfCXUK6avHWIPgWc7ycc6AsxQDzl2Dts3tBZ83qQQ@bKm6ca5odGyLgtbhcm1wXHSgaZ5THpJfgGjNgENsQMeumTEGHIv@1MoyjzJP7nxz7qdJVZRveR1@SAoZsJUlEEMK3FNyevVClbJztiYr3buzBL6bB0fZzr8Hxr4B "Wolfram Language (Mathematica) – Try It Online")
# [tinylisp](https://github.com/dloscutoff/Esolangs/tree/master/tinylisp), 18 bytes
Not exactly a builtin, but a library function:
```
map*
```
4 bytes for the function, 14 bytes for `(load library)`. [Try it online!](https://tio.run/##TYzBDoIwEETvfsUctyYeWiLhZsqfLFkOTbaKCCZ8fVmTih5n5s1b0n3T9JpKIX2wQNMw87ydKPN0xvhcWW8gIxZ4BDSuhsaCd65yl9p2/0B3zKScB2FQRG87iwRQXjUgIloh6R3QIzj3fbem8j/Z1XTtZy9lBw)
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 49 bytes
```
z(f,a,b,n)int*a,*b,(*f)();{for(;n--;f(a++,b++));}
```
[Try it online!](https://tio.run/##PU/LTsMwELz7K0ZFlbz2hkcJCMktP1L1YDsYLIGDSttDI3972LSEPXhWOzPrndi8xziOZ53Yc@BCuRyMZxNYm0Sa3JD6vXalaVzS3loO1hK5Ot7kEj@P3RvWP4cu97cfr0qd@twhHUvUsgWyBhcMpAYFKeOxgZbXSEuw0gfcYUVOVaUm7ZfPRc/yaeC37U5MA54ZL4wHxiOq@6fDTD8JwZNoNdMSSS5hyBWB0dJ1KmlwuS6L7d4JrNEKSCpcf53qey@SpBfLjrGQFdu8@/NXVcdf)
Loops for `0-n`, applying `f` on `&a[i], &b[i]`. Fairly simple.
Ungolfed signature:
```
void zipwith(void (*blackbox)(int *, int *), int *a, int *b, int length);
```
This version expects a function like this:
```
void func(int *a, int *b)
{
    *a = *a OP *b;
}
```
It overwrites the contents in `a`.
Since this is a pretty loose interpretation of the rules, I have also provided a more strict version which acts like a normal `zipwith`.
# [C (gcc)](https://gcc.gnu.org/) strict, ~~61~~ 54 bytes
```
z(f,a,b,n)int*a,*b,(*f)();{for(;n--;*a++=f(*a,*b++));}
```
[Try it online!](https://tio.run/##PU/LTsMwELz7K0ZFSH5seJSAkNzyI1UPdlIXS62LQnIh8reHdULYy1iex@401blppulHBnLkKamYeu1Ie5I6KKnsGG6dtKmqrHbG7IOcWWOUsnm6i6m5DO0Ju@@@jbeHzw8hOABhSI0sD0co4JUYBXi6Uz90CdJBwykYSI9HbJUVeXFeXUxyVc8Jh/qIPUa8Ed4Jz4QXZPtP@5V@ZYKKaLvS3InPoHKDJ9Rq@eU6mE@LbHuyDDvUDNwIy9YyXx1Lgtzct4QNRxzi8c@fRZ5@AQ "C (gcc) – Try It Online")
Loops for `0-n`, storing the result of `f` on `a[i], b[i]` to `a[i]`. Fairly simple.
Degolfed signature:
```
void zipwith(int (*blackbox)(int, int), int *a, int *b, int length);
```
Thanks to @att for reminding me I don't need a separate output array, saving 7 bytes.
[Answer]
# [Husk](https://github.com/barbuz/Husk), 2 bytes
```
δm
```
[Try it online!](https://tio.run/##AS0A0v9odXNr/@KCgeKCgv/OtG3/fivilqHDtzL//1s2LDgsMSwzXf9bNSwzLDYsMl0 "Husk – Try It Online")
(Implement the function in the footer, the header passes it to the main code)
Sure, Husk has a trivial builtin solution for this (`z`), but here's the shortest interesting solution :)
`δ` is a higher order function that turns something using an unary function on elements of one list into one using a binary function on elements from two lists.
Here, we turn the map function `m` that applies the (unary) input function to each element of the input list into one that applies the (binary) input function to each pair of elements from the two input lists: exactly what zipWith should do!
[Answer]
# x86-16 machine code, ~~15~~ 14 bytes
Saved 1 byte thanks to @Joshua!
```
AD 50 87 F3 AD 50 87 F3-FF D2 AB E2 F3 C3
```
Callable function.
Inputs:
* `CX` = lengths of both lists
* `[SI]` = address of first list
* `[BX]` = address of second list
* `[DX]` = address of function
Outputs towards `[DI]` = address of output list (buffer needs to be large enough).
Disassembly:
```
       LoopTop:
AD            LODSW           ; AX = [SI], SI+=2
50            PUSH    AX      ; push AX onto stack
87 F3         XCHG    SI, BX  ; swap SI and BX
AD            LODSW           ; AX = [SI], SI+=2
50            PUSH    AX      ; push AX onto stack
87 F3         XCHG    SI, BX  ; swap SI and BX
FF D2         CALL    DX      ; call function at [DX]
                              ; the function should take two items on the stack
                              ; and AX = the return value (stock calling convention)
AB            STOSW           ; [DI] = AX, DI+=2
E2 F3         LOOP    LoopTop ; --CX; jump to top of loop while CX >= 0
C3            RET             ; return to caller
```
## Example run
Tested with DOS debug:
```
-r
AX=0000  BX=0040  CX=0003  DX=0060  SP=FFFE  BP=0000  SI=0030  DI=0050
DS=1000  ES=1000  SS=0B17  CS=1000  IP=0000   NV UP EI PL NZ NA PO NC
1000:0000 AD            LODSW
-u1000:0060
1000:0060 58            POP     AX
1000:0061 A37600        MOV     [0076],AX
1000:0064 58            POP     AX
1000:0065 A37800        MOV     [0078],AX
1000:0068 58            POP     AX
1000:0069 01067800      ADD     [0078],AX
1000:006D A17600        MOV     AX,[0076]
1000:0070 50            PUSH    AX
1000:0071 A17800        MOV     AX,[0078]
1000:0074 C3            RET
-t
AX=0004  BX=0030  CX=0003  DX=0060  SP=FFFF  BP=0000  SI=0042  DI=0050
DS=1000  ES=1000  SS=0B17  CS=1000  IP=0001   NV UP EI PL NZ NA PO NC
1000:0001 50            PUSH    AX
-t
AX=0004  BX=0030  CX=0003  DX=0060  SP=FFFD  BP=0000  SI=0042  DI=0050
DS=1000  ES=1000  SS=0B17  CS=1000  IP=0002   NV UP EI PL NZ NA PO NC
1000:0002 87F3          XCHG    SI,BX
...
-t
AX=0009  BX=0036  CX=0000  DX=0060  SP=FFFF  BP=0000  SI=0046  DI=0056
DS=1000  ES=1000  SS=0B17  CS=1000  IP=000D   NV UP EI PL NZ NA PE NC
1000:000D C3            RET
-d1000:0000
1000:0000  AD 50 87 F3 AD 50 87 F3-FF D2 AB E2 F3 C3 00 19   .P...P..........
1000:0010  00 00 00 00 00 00 00 20-20 20 20 20 20 20 20 20   .......
1000:0020  20 20 20 20 20 20 20 20-20 20 00 00 00 00 00 00             ......
1000:0030  01 00 02 00 03 00 00 00-00 00 00 00 00 00 00 00   ................
1000:0040  04 00 05 00 06 00 00 00-00 00 00 00 00 00 00 00   ................
1000:0050  05 00 07 00 09 00 00 00-00 00 00 00 00 00 00 00   ................
1000:0060  58 A3 76 00 58 A3 78 00-58 01 06 78 00 A1 76 00   X.v.X.x.X..x..v.
1000:0070  50 A1 78 00 C3 00 0A 00-09 00 00 00 00 00 00 00   P.x.............
```
[Answer]
# [Rust](https://www.rust-lang.org/), 34 bytes
```
|f,a,b|a.into_iter().zip(b).map(f)
```
[Try it online!](https://tio.run/##PY1BCoMwEEX3PUV0NQMxi7qRqOktuikiMSQQiFFs2kWNZ7cJhcIM83h8/myvZziNJ7O0HnB3OhDDjYc0YOsrTYtYiYx3rbp0xR@SH0l/RkMlnaJk1odltEFvgOxjV5iQzXIFg2d7ycVvrUhPDERIeYyymmhSxaOh9fCjmjYDMrU4p1XgvMufRiEA28u6pXrnCyh3fjvKnE/2OL8 "Rust – Try It Online")
Rust doesn't have a `zipwith` function but it does have a `zip` and a `map` function. Returns an iterator over the values.
[Answer]
## **GNU-C-Preprocessor, 90 + O(48\*n) Bytes**
There should be code golf challenges for C preprocessor only, my idea:
```
#define T(x,...) x
#define D(x,y...) y
#define A(f,x,y) f(x,y)
#define Z5(f,x,y) A(f,T x,T y),Z4(f,(D x),(D y))
#define Z4(f,x,y) A(f,T x,T y),Z3(f,(D x),(D y))
#define Z3(f,x,y) A(f,T x,T y),Z2(f,(D x),(D y))
#define Z2(f,x,y) A(f,T x,T y),Z1(f,(D x),(D y))
#define Z1(f,x,y) A(f,T x,T y)
```
This example works for input lists of length <= 5. You can call the function like this:
```
#define C(x,y) x##y
(Z5(C,(h,e,l,l,o),(w,o,r,l,d)))
```
which results in
```
(hw,eo,lr,ll,od)
```
The "n" is the maximum list length to process and output. Of course you could use single characters instead of "Z" as name but using a digit allows for more flexibility and easier maintenance. For example you could add a parameter for "Z" to specify the bounds which is concatenated as `Z##n` and used as nested macro call.
The C Preprocessor opens a new realm of languages for code golf and is a rather minimal pure-functional primitive-recursive programming language which only features macro substitutions (which look like function calls, '(', ')', ',' and '#' are the only characters with special meaning), stringification, character concatenation (must be result in valid C tokens) and no direct recursion (each call must be defined with different macro name). Primitive-recursive means, it uses inputs of strictly bounded or fixed lengths and the program always terminates for all inputs. If you want a program for unbounded length, you would need an infinite program but program inputs are always bounded in practice. Literally any strictly limited output for strictly limited input values can be programmed by a primitive-recursive program and thus the C preprocessor. The program only must be big enough to compute it. It can become quite memory-inefficient though.
---
## GNU-C Preprocessor, 238 + O(32\*log3(n)) Bytes
A more optimal program size with O(log(n)) program growth is possible but requires hacky additional macro definitions and will only pay off starting with slightly larger input lists. This example purposefully does not add commas between elements in the output to allow for higher flexibility in output.
```
#define L4(p) L3(p) L3(p) L3(p)
#define L3(p) L2(p) L2(p) L2(p)
#define L2(p) L1(p) L1(p) L1(p)
#define L1(p) p() p() p()
#define T(x,...) x
#define D(x,y...) y
#define I(x...) x
#define W(r,f,a,b,x,y) (I r f(a,b)),f,x,y
#define X(r,f,x,y) W(r,f,T x,T y,(D x),(D y))
#define Y(x...) X(x)
#define C() )
#define O() (
#define U(x...) T(x)
#define Z(f,x,y) U(U(L4(Y O)(),f,x,y L4(C)))
```
Explanation:
* `L<x>` is the loop and `<x>` is the exponent of how often to loop.
* `T,U` = take first element from comma-separated list
* `D` = drop first element from comma-separated list
* `I` = identity function (evaluates arguments and can remove parens)
* `A` = applies a function but **without lazy argument-evaluation**
* `X,Y,Z` = the actual zipWith function
* `C` = closing parenthesis, needed for code generation
* `O` = opening parenthesis, needed for code generation (prevents unclosed macro call errors)
The main idea is to code-generate a long nested expression in a loop so that `Z(args)` evaluates to literally `Y ( Y ( Y ( ... args' ...) ) )` and `Y` reduces the arguments by one step when evaluated in `U(U(...))` (it does not work with only one `U`).
This example can process up to 3^4 = 243 elements of two lists. If you want to multiply the processing limit by 3, add a new loop line on the top of the code. You need about 20 loop lines to handle unsigned 32-bit of elements. But keep in mind that each element is evaluated, even if does not exist! This is an example which zip-concatenates elements of two lists and places a comma between elements *iff* the concatenation is not empty:
```
#define V2(x...) ,##x
#define V(x...) V2(x)
#define CONC(x,y...) y##x
#define CONC1(x,y) V(CONC(y,x))
#define D2(x) (D x)
D2(Z(CONC1,(h,e,l,l,o),(w,o,r,l,d)))
```
The result is `(hw ,eo ,lr ,ll ,od)` . It works with any lists with any number of elements but will output at most 243 elements. Tested on [godbolt.org](https://godbolt.org/).
If you find improvements which aren't only shorter macro names, please feel free to update this answer and leave a comment.
[Answer]
# [R](https://www.r-project.org/), 32 bytes
```
function(f,x,y)Vectorize(f)(x,y)
```
[Try it online!](https://tio.run/##RYzRCgIhFETf@wof76WJUClkwd/oMdyVlYRYQ4xqo283C9qeBs6cmVzneLnFcrI1XCdfYpoo4I4HH0ZfUo7zSIHpA34mOWsdZKehO8mrhW4cPBlobqFh@F8tzz0GfoZzSpn6o1oPW8WvZu8hDISE@G53LSEaU8z1DQ "R – Try It Online")
If [R](https://www.r-project.org/) *didn't* already have a built-in (`mapply`/`Map`) for zipwith, here's how one could implement it in 32 bytes...  
(...and if [R](https://www.r-project.org/) *didn't* have `Vectorize`, we'd need to implement it the 'hard' way for [54 bytes](https://tio.run/##RY3BCsIwEETvfkWOWRyRJCihkr/oTZS0xWBAWq0VU6XfHhfBetkHMzu8Pr/i9RmHs8vh0TZD7FoZkDDSO3S9jCK24n66ycolonIfDy7IxMDIh3bl9NtL75yHKgxMoWgxpyuPRloYYhhY@lezr0LNtkvHvuqol/Va08TfWwgLoSC@2w0TgjNNlD8): `function(f,x,y){for(i in seq(a=x))T[i]=f(x[i],y[i]);T}`)
[Answer]
# [Husk](https://github.com/barbuz/Husk), 5 bytes
```
mF₁Te
```
[Try it online!](https://tio.run/##yygtzv7/P9ftUVNjSOp/7f//o41NdIx0jGKBDCBtGAsA "Husk – Try It Online")
Takes the two arrays as arguments, and the function in the footer. You can use any binary function which operates on two `TNum`s from [Husk's Commands page.](https://github.com/barbuz/Husk/wiki/Commands)
## Explanation
```
mF₁Te Main program: accepts two arrays
    e two element list from the arrays
   T  transpose
m     map each pair to
 F    itself folded by
  ₁   the black box function
```
[Answer]
# [Factor](https://factorcode.org/), 24 bytes
```
[ zip swap f assoc>map ]
```
[Try it online!](https://tio.run/##Jcy9CsIwFIDRvU/x7YLg71DBVbp0EafS4RJSWkzbcHNBVPrsseB2ptOJs1nz417VtxJJaXaJp9fJB0axnqje7B11mIxLUdUlyamY64uGDS1fduw5sKw6cuLMkhs@QyS9JNL9z@u4us1OQmCLC140/wA "Factor – Try It Online")
Avoids the obvious built-in `2map` and its trivial generalizations `nmap` and `2map-as`, and uses `zip` and `assoc>map` instead (so it works like e.g. the [Rust answer](https://codegolf.stackexchange.com/a/218037/78410)). Takes the input from the stack in the order of `func arr1 arr2`.
Small golfing tip: when using a function that takes an "exemplar" (which specifies the type of the output container), supplying `f` has the same effect as supplying `{ }` (a plain array).
## [Factor](https://factorcode.org/), using `nmap`, 10 bytes
```
[ 2 nmap ]
```
[Try it online!](https://tio.run/##Dcg9DoJAEAbQnlN8vQmJvwUewNDQGCtiMZmMsnEZYHYslHj2dbuX9yD2yfLt2naXBi8xlYiRfMBs4v6ZLagjyfIWZUn1U1SMYviSh0kTzlXbNUhs5DxUK7bYYY8fVhxwxKmoxwb33JfXkeZCphhRg6OQ5T8 "Factor – Try It Online")
`nmap` is a generalized version of `map`-family of functions that works with `n` input arrays and `n`-ary functions. Obviously, `2 nmap` works on two input arrays and binary functions.
## [Factor](https://factorcode.org/), using `2map-as`, 13 bytes
```
[ f 2map-as ]
```
[Try it online!](https://tio.run/##DccxDoJAEAXQnlP8nmgCqAUcgNDQECtiMZkMwbAsy@xYGOLZV7r3JmLbND2Hrm9rLKJeHFayGUHF7Bv07Q1R9o94logm6/oakZWM5@xAgRIVfjhwwx2PUyNyvNKICeVK4ULxHJNzuIKdkKY/ "Factor – Try It Online")
`2map-as` is a simple variation of `2map` that takes an exemplar.
`2map` itself is already listed in the [trivial built-in catalogue](https://codegolf.stackexchange.com/a/218018/78410).
[Answer]
# [GNU sed](https://www.gnu.org/software/sed/), 55 + 1(r flag) = 56 bytes
GNU sed doesn't even have integers, not to mention functions, lists / arrays, etc. In order to participate, I used the following assumptions for the I/O methods, which hopefully respect the consensus regarding sed:
1. each input list / array is given on a separate input line, with the integers
separated by space.
2. the black-box function is predefined under the label `f`.
3. the black-box function arguments are two space separated integers
read from the first pattern space line (generated there at runtime during each
iteration).
4. the return value of the black-box function is placed on the first pattern space line
5. the output list / array is given as one integer per line.
```
1N                                            # read the 2nd input list
s:([^ ]+) ?(.*\n)([^ ]+) ?(.*):\1 \3\n\2\4:   # put list1[i] and list2[i] on first line
tf;:                                          # call the black-box function `f`
P                                             # print the function return value
D                                             # delete return value, start new iteration
```
[Try it online with sed 4.2.2!](https://tio.run/##TY2xDoIwFEVn@hU30QEwEgq4PEJcXFyMu5UEpEQSKU1bft8KJiZu59zhXCs77/mFWQpvNe67CMcwiYWK/jUiwSFyoUQmCmKuL4ldy5PfNKgqtAnOSs@OkMHq5iFhpW5M42QHNY@tNBaTgntK9IOxDq9BSUY9CyzVvxvBt8RpZIFb5ySm9CueL9EcBQ5IWb4wR7rye9JumJT1e/MB)
The implemented black-box function in the link above is `a == b`. The other test functions are significantly harder to implement in sed, but possible since the language is Turing complete.
[Answer]
# JavaScript (ES6), 32 bytes
```
(F,a,b)=>a.map((x,i)=>F(x,b[i]))
```
[Try it online!](https://tio.run/##fZBPT8JAEMXvfop3kUxh@2/bAjEuHki4@QmaHnaRSqV0GyDGb1@no2g8yGnfzsx788u82Xd73p6a/hJ2/mU31GagjbLKBWZlo6PtiT5Uw58Nv65sqiAYtr47@3YXtf6VaiKr4AKYFWZkYQx/FMpUQStkFctMZMpOxDHKhLVCUt39F2MRwrFv@etfXs2FQljcsk6n0Jjh2V72Ud16fyKHGHpEmnOO7JZUTuJgrulrdsbdOZdzHmK8ft/AgDqFA7@d5B/CEJMJaD12frY6PGFNjGxxP5YeWDzyTvEGTMNRX/oWuEzJ7XI5WCG4wroQ0DT5e0idC6tOvgeHTw "JavaScript (Node.js) – Try It Online")
[Answer]
# [Zsh](https://www.zsh.org/), 24 bytes
```
for 1 2 (`paste $@`)f $@
```
[Try it online!](https://tio.run/##qyrO@J@moWljY6MSrWKorWIUy2Vj42jnyGXIZcRlzOUI5DnZOXGZcJlymXE5cRWnlig4Kjj9T8svUjBUMFLQSChILC5JVVBxSNBMA5L///8HAA "Zsh – Try It Online")
Uses a [black-box function named `f`](https://codegolf.meta.stackexchange.com/a/13707), with input from two files specified in command line arguments.
However, `paste` alone is really just a `zip`, and this brings up some interesting debate depending on your interpretation of what counts as a "function" under the Unix philosophy of "everything should be a text stream":
```
#!/bin/zsh
# using a predefined function F
z1() { paste $1 $2 | F }
# using a function named in the arguments
z2() { paste $1 $2 | $3 }
F() { while read line; do rev <<< line; done }
z1 input1 input
z2 input1 input2 F
paste input1 input2 | F
paste input1 input2 | rev
# so maybe paste is just a point-free function?
paste
```
So maybe this is a trivial built-in solution:
**Unix shell (?), 5 bytes (?)**
```
paste
```
[Answer]
# Java 8, 52 bytes
```
A->B->{for(int l=A.length;l-->0;)A[l]=f(A[l],B[l]);}
```
Puts the result in the first argument instead of returning a new integer-array (to save 25 bytes).
[Try it online.](https://tio.run/##vVTBjtowEL3zFb5UsjeOl8BCUbNOy1btrdrD9oY4OMGhZo0TOQ4VQvl2aifZFCq0WlroZTz2jMfvvbG9YhvmrxbP@0SyogDfmFC7HgAsLoxmiQGFYUYkoIl@54VxUQAe4xW30RS2DsOtE6MmAQDNTakVFMog5tVDHNahqra1yctY2uorC4KURkiSlioxIlPka@vcN3Vnc3wq63OminLNdZcVRSABdD/1owc/2qWZdgcDSadEcrU0P0Lp@1E/RNOZnNMUugE/WIPCau8AOYRVr9cha@lvMrEAa6sNfDJaqOVsDpheFuhQDLcGKFD8Z7ewC/AAD6uGtgs4AWGn0KfHDddaLHg7f4Oor8j6ImxFEsLyXG4hQ4QlCc8NPAJ1h0d4XKFm19O2MHxNstKQ3DIzUsHfOk@1ZtuCmKxhbQvaXfW2/8cUMErPZTi0YIJLM5xcs5P@X3VyiCeXZjnGExxck@nN0dW9HZxJeYSHeIwHl6Z9Z2/MCF@1xTdfSsk1bHijY9oAuG@qSXCeOqjh5poGYbfw8qsJOgjFvQqF56EuaPNTuEwWUGCFKA0OIxaP54V/vi99CkpdQTlWzp5@lf2P8QeXF79jmKEz@/jedjHo/9s7dYdV@18)
**Explanation:**
```
A->B->{                     // Method with two integer-array parameters & no return-type
  for(int l=A.length;l-->0;)//  Loop `l` in the range (length,0]:
    A[l]=                   //   Change the `l`'th item in the first array to:
      f(                    //    Call the black-box function `f`
        A[l],B[l]);}        //    with the `l`'th items of both arrays as parameters
```
**Black box input format:**
Assumes a named function `Object f(Object a,Object b)` is present, which is allowed [according to this meta answer](https://codegolf.meta.stackexchange.com/a/13707/52210).
I have an abstract class `Test` containing the default function `f(a,b)`, as well as the lambda above:
```
abstract class Test{
  Object f(Object a,Object b){
    return(int)a+(int)b;
  }
  public java.util.function.Function<Object[], java.util.function.Consumer<Object[]>>c=
    A->B->{for(int l=A.length;l-->0;)A[l]=f(A[l],B[l]);}
  ;
}
```
For the test cases, I overwrite this function `f`. For example, the third test case (which is responsible for the black-box having `Object` as parameters/return-type instead of `int`) is called like this:
```
Object[] a = new Object[]{1,2,3};
new Test(){
  @Override
  Object f(Object a,Object b){
    return a==b;
  }
}.c.apply(a).accept(new Object[]{3,2,1});
System.out.println(java.util.Arrays.toString(a));
```
[Answer]
# [Nim](http://nim-lang.org/), 71 70 bytes
```
iterator z[I](f:proc(x,y:I):I;a,b:seq):I=
 for i,x in a:yield x.f b[i]
```
[Try it online!](https://tio.run/##jY@7jsIwEEV7vuKW9jIg8RQyCqJNvWWUwgYHRgIMjlkFfj47BNFQpZqr0ZyjOxc@ty0nH20KEc8iL1VlrjHsVEMPk2uTry05U/ubxGyASq6YGvAF1jzYn/ZoxhVcwWXL52uICXJ7T3yqCfX9YOPA744BKfz6m3oqZY2wieC6qZFtYDGEI2yLCWFKmJWvPCcsCMtS6z6C0VuwEqijBV31QmUqiyyD098NZl2e9Gvw0z2BPf@9oG2xlAICf1zSR3SynIqu/Qc "Nim – Try It Online")
[Answer]
# [Idris](https://tio.run/##y0wpyiz@/7/KSiNR1y5J1y5ZU9fOJ7O4RCERSidB6WSuKoU0jQorqzJNjUorq3JN2zSFCgUgCyisUKZQDpSOB0Hb6Nj/uYmZeQpWCp7@ChqaXGCOrUJBUWZeiYKKQpWChramQrShnp5xrEK0iZ6eWex/AA) - 77 bytes
```
z:(a->b->c)->List a->List b->List c
z f(x::v)(y::w)=f x y::z f v w
z _ _ _=[]
```
[Answer]
## Stax, 6 bytes invocable, or 3 bytes toplevel
Does not make sense to compress functions in stax so I didn't.
The two arrays are passed on the stack, and the black-box function is passed in the x register.
```
|\{x!m
```
Explained:
```
|\                Zip input arrays
  {
   x              push contents of x register
    !             invoke top of stack
  m               map
    
```
Program head version: two arrays are passed to it on the stack; body of blackbox program follows
```
|\m
```
Explained:
```
|\                Zip input arrays
  m               map array with rest of program
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 11 bytes
```
Inner[##,]&
```
[Try it online!](https://tio.run/##Vc29CoMwFIbh3asIBLL0SJtYfxaLSwvdhI6SQhBFQSNIOoV46@mxKYWe5SwP3zsrM3SzMmOrfF/6u9bd2lAKkvl6HbVpaHzpq4pKtj1apTcbWVqWVDDyOyCWg4DEgU3wc@cAUfxndlR8SRHAUxxu07JgTRyFZAgyKIB/UAoJZCACJNfX1K31MKKUZIdnzKQQ9nKE/BS6kfNv "Wolfram Language (Mathematica) – Try It Online")
Returns a `Null` of results.
[`Inner`](https://reference.wolfram.com/language/ref/Inner.html) *almost* does zipwith - except, by default, it returns the sum of the results.
---
### Also 11 bytes
```
#@@@In@@#2&
```
[Try it online!](https://tio.run/##Vc09C4MwEAbg3V8RCGTpSZtYPxZLlha6CR3FQhBFQSNIOoX419OrDYXechzvw72zMkM3KzO2yvelp1LKu5aSCuarddSmpvGlx7th26NVerORpWWJMfkNEGs5CEgc2AQ3d84BsvhP7awIqAjkKQ63aVnWmoqjaNiHZFAA31kKCWQgAiXX19St1TCibchOz1iWwvdnjpSfQnvk/Bs "Wolfram Language (Mathematica) – Try It Online")
`In` (among others) is as short as a built-in `Listable` function gets, and remains unevaluated with >1 argument.
[Answer]
# [Red](http://www.red-lang.org), 69 bytes
```
func[a b f][collect[repeat i length? a[keep compose[(f a/:i b/:i)]]]]
```
[Try it online!](https://tio.run/##dc@xCoMwFAXQ3a@4o7aDqFXExX/oGjLE5FlDU001Uu3P2yBOQt9w73K48EZS250U48FX2492XYWtnXvJBBq0nMnBGJKOjWRJOGgY6h@uqyHYk8hCDi87TMTCFiKuNBofEfe32VH3DscqWIIUGQe7IUfBUQmlgj8k8514Qu9ZmPqsysOUXkxz40Yh3dkUKJHsLkeGAinH/tSClfu4YMEV4YoYacS3Hw "Red – Try It Online")
## Printing the result instead of returning it:
## 61 bytes
```
func[a b f][repeat i length? a[print compose[(f a/:i b/:i)]]]
```
[Try it online!](https://tio.run/##dc@xCoMwFAXQ3a@4o7aDqFXExX/oGt4QTawBq2mMVPvzabBOQpf7hnt4cI0U7i4Fo@Cj9FvZvoLrlrFlHA06YkZqyS0UBjk@bF@DM23UaNFOTz3NkoUdeFwpND4iInK/@vgGliBFRmA35CgIFRci@EMyfxNP5GvhQ31W5WFKL@alsYa39mwKlEh2lyNDgZSwj1mxkY8LVlwRboiRRuS@ "Red – Try It Online")
[Answer]
# [Racket](https://racket-lang.org/), 41 bytes
```
(λ(x y f)(for/list([i x][j y])(f i j))))
```
[Try it online!](https://tio.run/##hY8xDoJAFER7TjGJhf9LCAGE0HgSQrEBVhc3QBYSF6/mHbwSbhBL4lQzkzfFGFHdm2k5aNFdYdbgUd1I1TV4quGhpttC7xdZzJBMsjehVuNEhYItixZz6UootOy0UK3GQYtZd6BtjSNFiJGwM2ekyBg@s/eHTJyJGJddMv9xOSPYpTLkiL5kigQZYsb2hqmxopoCqfvekE8nWFim0P2MeRWWDw "Racket – Try It Online")
`for/list` is almost the necessary builtin, just needs some additional syntax.
[Answer]
# Scala 3 (compile time), 87 bytes
```
type Z[F[_,_],A<:Tuple,B]<:Tuple=(A,B)match{case(a*:b,c*:d)=>F[a,c]*:Z[F,b,d]case _=>A}
```
[Try it online!](https://scastie.scala-lang.org/T4sTqG2OSGyUVe3yjvRtog)
Takes tuples instead of lists.
This isn't particulary interesting or complicated, but here's an explanation:
```
type Z[                //Declare a type Z taking these arguments
  F[_,_],              //A type F that itself takes two arguments
  A <: Tuple,          //The first list, a tuple
  B                    //The second list (actually also a tuple)
] <: Tuple =           //The returned type is also a tuple
  (A, B) match {       //Make a tuple (A, B) and match it:
  //`h*:t` represents a tuple with head `h` and tail `t` (like :: or :)
  case (a *: b, c *: d) => //If A is of the form a*:b and B is of the form c*:d
    F[a, c]         //Call F on the heads
      *:            //And prepend that to
      Z[F, b, d]    //The result of zipping the rest of the tuples
  case _ => A //Otherwise, both tuples are empty, so we return an empty tuple
  }
```
[Answer]
# Pure [Zsh](https://www.zsh.org/), 31 bytes
```
b=($=3)
for 2 3 (${${=2}:^b})$@
```
[Try it online!](https://tio.run/##TY7RCoJAEEXf5ysuNrC7hQ9q9RAu9B9R4GKhD7WiRqD47duqYTIwD@feOUzXFK4rq0/ZFlJJVHX5ahH64QgbPGyN/P60zmjJOlE0ghgJJPfc63g43cyg@OwUUZbnUiFNU7742x04vhI1b7OC4Qyr2q6r25lmWkSjW5DRYo8DjoLo9xq8HAFngV8mWKi3T2CKFjrq/2X3BQ "Zsh – Try It Online")
Takes parameters `function name, space-delimited list, space-delimited list`
With `-o shwordsplit`, one byte is saved with `b=($3)` instead.
```
b=($=3)                  # =split $3 and save as array $b
#        ${${=2}:^b}     # Zip $=2 and $b together
for 2 3 (${${=2}:^b})    # Loop over 2 at a time as $2 and $3 (argv[2], argv[3])
    $@                   # $1 $2 $3
```
[Answer]
# [Groovy](http://groovy-lang.org/), 36 bytes
```
{f,a,b->[a,b].transpose().collect f}
```
[Try it online!](https://tio.run/##ddDNDoIwDADgu0/Ro0gBAUE8wGt4WHYYBpSEABnTgMZnxw4XfxLtoema9EvXo2zbyzhdq25fqVM63UoUmDsZo8xdJUXTd21fLC330NZ1cVBQ3qdOVo2qGzBTy9uAo5MN9nhH0MF8hAAh5AhsgxAhxNwCE54HjDpbhB1f/JHS1FCfUjiX/rdUirovEJQ8U54ff1HntV7yFHVJaPIW3@s50Q9nvoxYCTv3ArJYTMO0kdmPpkijXqBB7YSJq/8e6Ux38Nd8egA "Groovy – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), ~~37~~ 35 bytes
```
lambda f,*a:[f(*t)for t in zip(*a)]
```
[Try it online!](https://tio.run/##fVHBbsMgDL3zFT5CitSmWbcqEl@S5eAsSYO6ACJE0/bzmUFIaTVpvoCe7ff8bPcdJmuq7Ue7Lx0m9b594tz1CKMssG5GXgQxWg8BtAEq4gWKdhu9nWHGMIGenfUBbh89S6B1g8dADTmxrB1j/TCCmzQ3omZAgbNdTQAFJ8iR4KhzjzoezW3gpQQDByhzUww9RiVuJNwFKAXlnnrgPVAi4X4IqzcZZiwMS1hIteHZI8qu1iZwVKoTEhpSPEuoWvpW6Vu2Qu4KnMxQ6rqXXJ/zD7SABdLw3fFINM0rlRJbbrzQK4Gw8z/tUKSVpble0jCXRJIY3lJ7efo7ZMtYOhdZjZtMluunLTsfLed703mpQojtFw "Python 3 – Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 93 bytes
```
function Z($F,$S,$R={,$args}){[Linq.Enumerable]::Zip($F,$S,[Func[Object,Object,Object[]]]$R)}
```
**Example**
```
Z (1,2,3) (4,5,6) {param($a, $b) ($a+$b)}
'-'
Z (8,3) (3,8) {param($a, $b) ($a-$b)}
'-'
Z (6,8,1,3) (5,3,6,2) {param($a, $b) ([math]::pow($a,2)+$b/2)}
'-'
Z (1,2,3) (3,2,1) {param($a, $b) ([int]($a-eq$b))}
```
[Try it online!](https://tio.run/##bY5BC4JAFITv/oo9LOTSs1BTROhYpyCom8seVtlyQ1czo4P42@0lRUWdhjd882bq6qaaS66KYhgOV5O1ujIkseka6B7obtkBlc3x0rOOb7Q5z1bmWqpGpoUScZzo@knyNWb5Nj2prIUv4UIIumP9kBDbBQ98RuwFBBAy0tWykaVNJRCaok3lFLW3Js7EQjoaWR@if6TzSYYQgTvSAfgQgveb4KVsc5xcV7eH6TGsmnvvF69pPqr7J65NKx616ow3xoY7 "PowerShell – Try It Online")
It is a zip function which can take map expression as its third parameter to know how to pass it then see the demo in the Try it online "Footer" section how to use it.
[Answer]
# [Python 3](https://docs.python.org/3/), 19 bytes
```
lambda*l:[*map(*l)]
```
[Try it online!](https://tio.run/##fVHLboMwELz7K/ZoO5YSkqaJkPwllIMpEKzgh4xR1f48XbtUJKrUvWDN7MzuLP4zDs6eli/tP3Qc5NsyKtO0io9lxY3ylI@sXvrgDBgVB9DGuxDh9t6SDDrfBRVd@CWmuSGk7Xrwg6aWlQSwlHGzjSDhAGtluEfZHbSFoOyto4UACzsoVlEq3adJ1Aq4M5ASio168N0hkfHQxTnYFSYkdlOccGpFfzKBEk2pbaRKyoYJqHDiUcCpxucpP4uaiW0CxTBIXbeW6zP/YAuKK1y@2e/RpnrFVnRbhWf8CkDs@I8ceD5Z3uslL3POJtnhkuXF4e@SNSHpjClqumSOXD5d2YcUef2/lKcOxpZv "Python 3 – Try It Online")
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), 5 bytes
```
£Zƛ¥R
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=%CE%BB%2B%3B%C2%A3Z%C6%9B%C2%A5R&inputs=%5B1%2C2%2C3%2C4%5D%0A%5B3%2C4%2C5%2C6%5D&header=&footer=)
I don't know how to input functions properly in Vyxal, so the Vyxal interpreter link just has the function stuffed with the code.
```
£Zƛ¥R
£     Set the register to the blackbox function
 Z    Zip the two lists
  ƛ   For each element of that
    R Reduce using
   ¥  The function in the register
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip) `-xp`, 5 bytes
```
aMZbc
```
[Try It Online!](https://dso.surge.sh/#@WyJwaXAiLCIiLCJhTVpiYyIsIiIsIiIsIi14cCB7U1FhK0hWYn0gWzY7ODsxOzNdIFs1OzM7NjsyXSJd)
### Explanation
This is essentially a built-in, the ternary `MZ` (map-zip) operator. However, I'm pretty sure a bare operator isn't a valid solution, so I've made it a full program. The `-x` flag allows functions and lists to be evaluated as such when passed as command-line arguments, and the `-p` flag means lists will be output in list format rather than concatenated together.
[Answer]
# [Icon](https://github.com/gtownsend/icon), 52 bytes
```
procedure z(a,b,f)
write(f(a[i:=1to*a],b[i]))&\y
end
```
[Try it online!](https://tio.run/##ddDBTsMwDAbge57CFAklmyPUlFXVpj4Az1ByyNpkRCoJShpo9/IjlEmgSZx88Gf9tm3v3eXyHnyvhxQ0nKnCIxpGPoOdNDVUdXbflpPfKInHzkrGHl4Wot3wZ8g4OuPCCAAEPaXgYN7MsIXlUXxLQn7pm7KOrvJMuxIFVhK7J9xhLbHYFuwAP8EF57y4dVWuZXbtrcvsHp7zKfCqIpy8Gvlgg@4nPYD@UGNSk81NDt6NC4hWgI0QU9/rGE0a4e4a1FxjmhzC/1mmxgbL1e2wwhqFROPY@pEv "Icon – Try It Online")
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 8 bytes
```
l'.l++~p
```
[Try it online!](https://tio.run/##S85KzP3/P0ddL0dbu67g//9oQwUjBeNYhWgTBVMFs1iuau1aAA) Or verify the first three cases:
[1](https://tio.run/##S85KzP3/P0ddL0dbu67g//9oQwUjBeNYhWhjIG0Yy1VtWwsA),
[2](https://tio.run/##S85KzP3/P0ddL0dbu67g//9oCwXjWIVoYwWLWK5q3VoA),
[3](https://tio.run/##LcrRCkAwFAbge0/xlwtli0zkXUZapkxHnWIk8erjwvX3DbNZQqAkIyEeDkHXaFCg7KArlKihuuhq@7RVubgxxlgPwxLWM7nBbKPE4mlzTKf8if06QX3F7c5@bqx9AQ).
Input is a line with (the string representation of) two arrays, and then a line with (the string representation of) the function, defined as a CJam block.
### How it works
```
l    e# Read line containing the two arrays
'.   e# Push character "." (which will do the actual job)
l    e# Read line containing a code block
++   e# Concatenate twice
~    e# Evaluate as CJam code
p    e# Print
```
]