1
$\begingroup$

I have a function:

f = # - ((1 - #2)*a + #2*b) &; 

and I would like to apply it to a list like this: {{1,2},{2,3}....}

I expecting to get a list of numbers.

Have anyone an idea?

$\endgroup$
3
  • 5
    $\begingroup$ try f @@@ list $\endgroup$
    – Kuba
    Jun 7, 2017 at 15:54
  • $\begingroup$ at least closely related: 100700, 10833, 1970 $\endgroup$
    – Kuba
    Jun 7, 2017 at 15:55
  • 1
    $\begingroup$ Or f2 = #[[1]] - ((1 - #[[2]])*a + #[[2]]*b) &; f2 /@ list $\endgroup$
    – Bob Hanlon
    Jun 7, 2017 at 17:59

0

Browse other questions tagged or ask your own question.