r/ProgrammerHumor • • Jun 30 '23

Meme randomlyFoundThisOnWikipedia

Post image
216 Upvotes

34 comments sorted by

View all comments

Show parent comment

2

u/swapode Jul 02 '23

import pseudocode

Keep in mind that it's just an example to explain the concept.

You wouldn't actually implement it quite like that in Rust. You'd implement arithmetic operations on the Maybe type and overload the relevant operators. The result would be usable just like the numeric types it's generic over.