I work on problem that need to define function with two list of data as follow

```
a = {0.1, 0.233, 0.65, 1.56};
b = {0.99, 0.8, 0.9, 1.9};
ELCDM1(z_?NumericQ, om_?NumericQ) := 1/Sqrt(om*(1 + z)^3 + 1 - om);
angdist(zmin_?NumberQ, zmax_?NumberQ, om_?NumberQ) := (3*10^5)/(
1 + zmax) NIntegrate(ELCDM1(z, om), {z, zmin, zmax});
```

“a” is list of lower bound of integrate and b is upper bound. The true outcome for my function “angdis” is

{100707., 71762., 25625.6, 13508.}. For me I should put first list “a” to my function and at the end of my program put list “b” so as I did as follow the outcome is different with {100707., 71762., 25625.6, 13508.}.

```
angdist3(x_,
om_) := (3*10^5)/(1 + #) NIntegrate(ELCDM1(z, om), {z, x, #}) & /@
b;
angdist4(om_) := angdist3(#, om)((#)) & /@ a;
angdist4(.3)
```

here is the outcome :

```
{{100707., 92199.9, 97142.2, 111441.}((
0.1)), {82220.6, 71762., 77779.9, 98755.}((
0.233)), {32424.9, 16710.2, 25625.6, 64584.9}((
0.65)), {-42008.8, -65580.4, -52333.9, 13508.}((1.56))}
```

Any suggestions would be greatly appreciated.