On Tuesday, 6 July 2021 at 15:48:35 UTC, rassoc wrote:
>You can also do:
import std;
void main()
{
// https://dlang.org/phobos/std_ascii.html#.lowercase
"Book.".filter!(c => lowercase.canFind(c))
.each!(c => writeln(c, " found"));
// Output:
// o found
// o found
// k found
}
I really don't like reading arrow functions.
It takes some more effort to understand, follow and get used to them.
I'd like something simple and effortless looking and feeling that would make code readable similarly to an english sentence.
Such as this, but as noted, this does not work as intended/assumed by me:
if (letter.findAmong(alphabet)){
write("found");
}