615 karma · joined May 28, 2019
function pipes(callable ...$pipes): Closure
{
return function($value) use ($pipes) {
foreach ($pipes as $pipe) {
$value = call_user_func($pipe, $value);
}
return $value;
};
}
This makes the pipes reusable and makes it so that functions that take only a single argument can be passed as a plain string: $sanitize = pipes('trim', 'htmlspecialchars');
$title = $sanitize($title);
$body = $sanitize($body);
While also preserving the ability to pass a closure when you need multiple arguments.This is about the best and most intuitive solution you could come up with to this problem. Sadly I believe the Samsung Galaxy S4 was the only phone that supported this without an S Pen so you could simply hover over the screen with your finger. I wish it was a standard feature on all phones.
Clearly you are extremely biased and refuse to look at things in any other way but life doesn't revolve around "I eat animals or I don't".
Vegans aren't immune to cancer or heart diseases (they only have a small reduction of these in some studies) and they don't live 20-30-40-50 years longer than omnivores. And the reason vegans weigh less is because they're more aware of how much they eat compared to the mostly uneducated (in terms of nutrition) population.
While the animal products consumption per person has increased in the US, so have other factors such as stress, depression, loneliness, alcohol consumption and a sedentary lifestyle which all contribute to diseases. And if you pay close attention, the reduction of all these factors is what countries in the "blue zone" all have in common.
> Eating more red meat under the Paleo diet paired with a lack of whole grains results in higher levels of a biomarker linked to heart disease
WITH A LACK OF WHOLE GRAINS. Does that mean that red meat is the cause or that the lack of a balanced diet is the cause?
> The places in the world that have the best health are the ones that eat fewer animal products.
Where's the evidence for that claim? If we look at the life expectancy for each country:
https://en.wikipedia.org/wiki/List_of_countries_by_life_expe...
The US ranks at #30 out of 180 which is quite decent despite their huge consumption of animal and more importantly processed foods. The countries which are at the bottom are there not because they consume animal products but because they have poor living conditions and little to no health care available. Meanwhile Japan is at #1 and all kinds of meats including raw are a frequent part of their diet.