Follow

TIL you can do x = f() ?: g() instead of x = f() ? f() : g(). The ?: thingy is called "Elvis operator". Available in many languages, not just C.

en.wikipedia.org/wiki/Elvis_op

· · Web · 0 · 1 · 0
Sign in to participate in the conversation
Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!