user-1: Disclaimer: The following code hasn't been compiled, and probably won't work in any way.  This is just for opinions relating to this Arduino question as I'm still learning and experimenting with different coding techniques.
As I understand it (and please feel free to offer a (4.)), the following code could be written in numerous ways, including:

No lambdas, and each following lambda as a separate function of its own.
No lambdas, no external functions, and having it all flow within the same function.
Using lambdas in a similar way to the code provided below.
?

As my programs are getting sizeable, I'm currently finding it difficult to keep track using (1.) and/or (2.) when writing programs, especially if bugs show up. This has led me to question if there was a way to reduce a great many if and for (etc) into a single, text-editor-foldable "seed" (i.e. a single variable).
In my original question it was suggested that a possible way to do this could be option (3.) using lambdas.  However, it was also pointed out that it may be overkill/not practical, and without any examples of what I'm trying to achieve, it was difficult to make a more informed judgement. So with this in mind, I have thrown together an example showing how lambdas could help me achieve some readability to my code.
If this is an acceptable technique, or not, I would be extremely grateful for any advice.
Code, lambda example, unfolded:
// Structs data, fans;
void temperatures(int _temperaturePin) {

  data.cTemp = [](int _tPin) { // current temperature
    float _finalReading = 0.0f;
    for (int i = 0; i < temperatureResolution; i++) {
      float _currentReading = analogRead(_tPin);
      _finalReading += ( 10000 / ( ( 1023 / _currentReading ) - 1 ) );
    }
    _finalReading = (_finalReading / temperatureResolution);
    return (uint8_t)_finalReading;
  }(_temperaturePin);

  bool fanState = []( int rOne, int rTwo, int rThree ) { // fans on or off
    int _lowMin = data.tempTarget - ((data.tempTarget - data.tempMin) / 2);
    int _medMax = data.tempTarget + (( data.tempMax - data.tempTarget) / 2);
    bool _fanState = false;
    if (data.cTemp < data.minTemp) {
      digitalWrite(rOne, LOW);
      digitalWrite(rTwo, LOW);
      fans.off = !_fanState;
    } else {
      _fanState = true;
    }
    if ((data.cTemp > data.tempMin) && (data.cTemp > _lowMin)) {
      digitalWrite(rOne, LOW);
      digitalWrite(rTwo, HIGH);
      fans.low = _fanState;
    }
    if ((data.cTemp < data.tempTarget) && (data.cTemp < _medMax)) {
      digitalWrite(rOne, HIGH);
      digitalWrite(rThree, LOW);
      fans.medium = _fanState;
    }
    if (data.cTemp > data.tempMax) {
      digitalWrite(rOne, HIGH);
      digitalWrite(rThree, HIGH);
      fans.high = _fanState;
    }
    return _fanState;
  } (relayOne, relayTwo, relayThree);

  bool overloadProtection = [](bool _fState, int _lCount, int rCount) { // overload protection on or off
    bool _protect;
    int _pwmValue = 255;
    if (_fState) {
      _protect = ((_lCount > MAXLEDS) || ((_lCount > (MAXLEDS / 2) && (_rCount > MAXRELAYS) ))) ? true : false;
    }
    if (_protect) {
      for (int i = 0; i < _lCount; i++) {
        _pwmValue -= 10;
      }
    }
    for (int i = 0; i < _lCount; i++) {
      if (ledPins[i] == HIGH) {
        analogWrite(ledPins[i], _pwmValue);
      } else {
        digitalWrite(ledPins[i], LOW);
      }
    }
    return _protect;
  }(fanState, sizeof(ledPins), sizeof(relayPins);
}

Code, lambda example, folded:

I can see that methods vs lambdas don't appear to make a huge difference to overall word count in this case, however, I can happily fold away temperatures() and know that's the root of everything I need for anything temperature related (without having to break off into another library; as far as I am aware), instead of having potentially 3 more functions sitting there and cluttering up screen space.
This also makes working within temperatures() a less daunting task than having potentially 100's of for and if (etc) statements permanently in view.
I'm only a hobbyist programmer at the moment, learning in my own time with no formal programming education, so I am 100% completely open to any suggestions or advice, especially due to ignorance regarding this subject on my part.
Much appreciated!
P.S. codereview.stackexchange requires working code to post there otherwise I would have.

user-1: Standard method using normal functions
Quickly tell me, what does the temperature() function do?
// Structs data, fans;
void temperatures(int _temperaturePin)
{
  data.cTemp = getTemperature(_temperaturePin);
  bool fanState = getFanState(relayOne, relayTwo, relayThree);
  bool overloadProtection = getOverloadProtecton(fanState, sizeof(ledPins), sizeof(relayPins);
}

Well, it get the temperature, fan status and overload protection status. No need to know about lambdas, or even know C/C++: if you know any programming language (PHP, Javascript), you will able to understand what this code do.
Of course, getTemperature and others are implemented as traditional functions elsewhere. It's not important or relevant to know how they work, just what they do/return. I can write it in another source file and forget about them, never to be seen again.
Lamba method 
Same question (with your original code), what does the temperature() function do?
   // Structs data, fans;

    void temperatures(int _temperaturePin) {

      data.cTemp = [](int _tPin) { // current temperature
        float _finalReading = 0.0f;
        for (int i = 0; i < temperatureResolution; i++) {
          float _currentReading = analogRead(_tPin);
          _finalReading += ( 10000 / ( ( 1023 / _currentReading ) - 1 ) );
        }
        _finalReading = (_finalReading / temperatureResolution);
        return (uint8_t)_finalReading;
      }(_temperaturePin);
// More code ...

You have made one giant monolithic block of code, which is anatema by any standard. And code folding doesn't really solve that.
This not so easy to read. You have to scan searching for the each lambda end, taking mental notes about what is finally executing inside temperatures(). To much work, to much visual clutter, merging the what to do with the how to do it. 
Think about testing. How do you test your lambdas? You can't do it easily. You need to extract the code from your application, to start with. And add all those external variables your are accessing from inside the lambda.
With traditional functions, no need to change your application to test your functions; just write a test program to exercise your code.
Think about code reuse. It's dificult with your code identify common code to refactor/reuse it.

-1: <p>Disclaimer: The following code hasn't been compiled, and probably won't work in any way.  This is just for opinions relating to this <a href="https://arduino.stackexchange.com/questions/47815/somevariable-somethingthatlookslikeafunction-possible/">Arduino question</a> as I'm still learning and experimenting with different coding techniques.</p>

<p>As I understand it (and please feel free to offer a (4.)), the following code could be written in numerous ways, including:</p>

<ol>
<li>No lambdas, and each following lambda as a separate function of its own.</li>
<li>No lambdas, no external functions, and having it all flow within the same function.</li>
<li>Using lambdas in a similar way to the code provided below.</li>
<li>?</li>
</ol>

<p>As my programs are getting sizeable, I'm currently finding it difficult to keep track using (1.) and/or (2.) when writing programs, especially if bugs show up. This has led me to question if there was a way to reduce a great many <code>if</code> and <code>for</code> (etc) into a single, text-editor-foldable "<em>seed</em>" (i.e. a single variable).</p>

<p>In my original <a href="https://arduino.stackexchange.com/questions/47815/somevariable-somethingthatlookslikeafunction-possible/">question</a> it was suggested that a possible way to do this could be option (3.) using lambdas.  However, it was also pointed out that it may be overkill/not practical, and without any examples of what I'm trying to achieve, it was difficult to make a more informed judgement. So with this in mind, I have thrown together an example showing how lambdas could help me achieve some readability to my code.</p>

<p>If this is an acceptable technique, or not, I would be extremely grateful for any advice.</p>

<p>Code, lambda example, unfolded:</p>

<pre><code>// Structs data, fans;
void temperatures(int _temperaturePin) {

  data.cTemp = [](int _tPin) { // current temperature
    float _finalReading = 0.0f;
    for (int i = 0; i &lt; temperatureResolution; i++) {
      float _currentReading = analogRead(_tPin);
      _finalReading += ( 10000 / ( ( 1023 / _currentReading ) - 1 ) );
    }
    _finalReading = (_finalReading / temperatureResolution);
    return (uint8_t)_finalReading;
  }(_temperaturePin);

  bool fanState = []( int rOne, int rTwo, int rThree ) { // fans on or off
    int _lowMin = data.tempTarget - ((data.tempTarget - data.tempMin) / 2);
    int _medMax = data.tempTarget + (( data.tempMax - data.tempTarget) / 2);
    bool _fanState = false;
    if (data.cTemp &lt; data.minTemp) {
      digitalWrite(rOne, LOW);
      digitalWrite(rTwo, LOW);
      fans.off = !_fanState;
    } else {
      _fanState = true;
    }
    if ((data.cTemp &gt; data.tempMin) &amp;&amp; (data.cTemp &gt; _lowMin)) {
      digitalWrite(rOne, LOW);
      digitalWrite(rTwo, HIGH);
      fans.low = _fanState;
    }
    if ((data.cTemp &lt; data.tempTarget) &amp;&amp; (data.cTemp &lt; _medMax)) {
      digitalWrite(rOne, HIGH);
      digitalWrite(rThree, LOW);
      fans.medium = _fanState;
    }
    if (data.cTemp &gt; data.tempMax) {
      digitalWrite(rOne, HIGH);
      digitalWrite(rThree, HIGH);
      fans.high = _fanState;
    }
    return _fanState;
  } (relayOne, relayTwo, relayThree);

  bool overloadProtection = [](bool _fState, int _lCount, int rCount) { // overload protection on or off
    bool _protect;
    int _pwmValue = 255;
    if (_fState) {
      _protect = ((_lCount &gt; MAXLEDS) || ((_lCount &gt; (MAXLEDS / 2) &amp;&amp; (_rCount &gt; MAXRELAYS) ))) ? true : false;
    }
    if (_protect) {
      for (int i = 0; i &lt; _lCount; i++) {
        _pwmValue -= 10;
      }
    }
    for (int i = 0; i &lt; _lCount; i++) {
      if (ledPins[i] == HIGH) {
        analogWrite(ledPins[i], _pwmValue);
      } else {
        digitalWrite(ledPins[i], LOW);
      }
    }
    return _protect;
  }(fanState, sizeof(ledPins), sizeof(relayPins);
}
</code></pre>

<p>Code, lambda example, folded:</p>

<p><a href="https://i.stack.imgur.com/77pXg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/77pXg.jpg" alt="folded code"></a></p>

<p>I can see that methods vs lambdas don't appear to make a huge difference to overall word count in this case, however, I can happily fold away <code>temperatures()</code> and know that's the root of everything I need for anything temperature related (without having to break off into another library; as far as I am aware), instead of having potentially 3 more functions sitting there and cluttering up screen space.</p>

<p>This also makes working within <code>temperatures()</code> a less daunting task than having potentially 100's of <code>for</code> and <code>if</code> (etc) statements permanently in view.</p>

<p>I'm only a hobbyist programmer at the moment, learning in my own time with no formal programming education, so I am 100% completely open to any suggestions or advice, especially due to ignorance regarding this subject on my part.</p>

<p>Much appreciated!</p>

<p>P.S. codereview.stackexchange requires working code to post there otherwise I would have.</p>
 -1: <p><strong>Standard method using normal functions</strong></p>

<p>Quickly tell me, what does the <code>temperature()</code> function do?</p>

<pre><code>// Structs data, fans;
void temperatures(int _temperaturePin)
{
  data.cTemp = getTemperature(_temperaturePin);
  bool fanState = getFanState(relayOne, relayTwo, relayThree);
  bool overloadProtection = getOverloadProtecton(fanState, sizeof(ledPins), sizeof(relayPins);
}
</code></pre>

<p>Well, it get the temperature, fan status and overload protection status. No need to know about lambdas, or even know C/C++: if you know <em>any</em> programming language (PHP, Javascript), you will able to understand what this code do.</p>

<p>Of course, <code>getTemperature</code> and others are implemented as traditional functions elsewhere. It's not important or relevant to know how they work, just what they do/return. I can write it in another source file and forget about them, never to be seen again.</p>

<p><strong>Lamba method</strong> </p>

<p>Same question (with your original code), what does the <code>temperature()</code> function do?</p>

<pre><code>   // Structs data, fans;

    void temperatures(int _temperaturePin) {

      data.cTemp = [](int _tPin) { // current temperature
        float _finalReading = 0.0f;
        for (int i = 0; i &lt; temperatureResolution; i++) {
          float _currentReading = analogRead(_tPin);
          _finalReading += ( 10000 / ( ( 1023 / _currentReading ) - 1 ) );
        }
        _finalReading = (_finalReading / temperatureResolution);
        return (uint8_t)_finalReading;
      }(_temperaturePin);
// More code ...
</code></pre>

<p>You have made one giant monolithic block of code, which is anatema by any standard. And code folding doesn't really solve that.</p>

<p>This not so easy to read. You have to scan searching for the each lambda end, taking mental notes about what is finally executing inside <code>temperatures()</code>. To much work, to much visual clutter, merging the <em>what to do</em> with the <em>how to do it</em>. </p>

<p>Think about testing. How do you test your lambdas? You can't do it easily. You need to extract the code from your application, to start with. And add all those external variables your are accessing from inside the lambda.</p>

<p>With traditional functions, no need to change your application to test your functions; just write a test program to exercise your code.</p>

<p>Think about code reuse. It's dificult with your code identify common code to refactor/reuse it.</p>
