Question: I'm creating a website using wordpress and I'm trying to add a MP3 music into it.

But the music don't autoplay on mobile. And when I click on pause, the music stop, but if I scroll (on PC or mobile) the music start again and again and again.

Here the html code :

```
<figure>
<audio
    controls
    src="https://www.blog-motivation.com/wp-content/uploads/2022/04/ولنبلونكم-بشئ-من-الخوف-والجوع-ونقص-من-الاموال-والانفس-والثمرات-وبشر-الصابرين-اسلام-صبحي.mp3" autoplay>

</audio>

```

thank you

Answer: 
I think it's important to know the 3 following methods when working with lambdas.
The three firsts do essentially the same thing: storing the lambda for future use.
The other seems to be what you expect from your code: you directly call the lambda and get the result, so the return type is the type returned by the lambda.

```cpp
#include <iostream>
#include <functional>

int main()
{
    // Auto store the lambda
    auto auto_keyword = [](int a) -> int
    { return a; };
    std::cout << auto_keyword(42) << std::endl;

    // std::function store the lambda
    std::function<int(int)> std_function = [](int a) -> int
    { return a; };
    std::cout << std_function(42) << std::endl;

    // raw function pointer
    int (*raw_fptr)(int) = [](int a) -> int
    { return a; };
    std::cout << raw_fptr(42) << std::endl;

    // direct call to the lambda. (what you expect from your question)
    std::cout << ([](int a) -> int{ return a; })(42) << std::endl;

    return 0;
}

```

A lot of things happen here, and I suggest you to read at least [this page from the reference](https://en.cppreference.com/w/cpp/language/lambda) for a better understanding.
From C++ standard

> 
> [C++11: 5.1.2/3]: **The type of the lambda-expression (which is also the
> type of the closure object) is a unique, unnamed non-union class type
> — called the closure type —** whose properties are described below. This
> class type is not an aggregate (8.5.1). The closure type is declared
> in the smallest block scope, class scope, or namespace scope that
> contains the corresponding lambda-expression.
> 
> 
> 

In short each instance of a lambda is its own unique unnamed type.

> 
> [C++11: 5.1.2/5]: The closure type for a lambda-expression has a
> public inline function call operator (13.5.4) whose parameters and
> return type are described by the lambda-expression’s
> parameter-declaration-clause and trailing-return-type respectively.
> 
> 
> 

Since lambda has function call operator defined you can assign it to std::function

> 
> [C++11: 5.1.2/6]: The closure type for a lambda-expression with no
> lambda-capture has a public non-virtual non-explicit const conversion
> function to pointer to function having the same parameter and return
> types as the closure type’s function call operator. The value returned
> by this conversion function shall be the address of a function that,
> when invoked, has the same effect as invoking the closure type’s
> function call operator.
> 
> 
> 

If the lambda does not capture anything it can be converted to a function pointer.