Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 628 Bytes

README.markdown

File metadata and controls

26 lines (18 loc) · 628 Bytes

Has this ever happened to you?

Alice: "Darn it! This code does the same thing every single time!"

Bob: "Clearly, we need a more stochastic solution."

Fret no more. maybe.h extends C with a new flow control mechanism that fixes this irksome limitation.

When you know under what conditions a block should run, use if.

if (onBack(turtle)) {
    flip(turtle);
}

When you don't, use maybe.

maybe {
    order(LUNCH, PIZZA);
} else {
    order(LUNCH, CHINESE);
}

New in v0.2: maybe.h now defines surely, for those situations when you are entirely certain a block should run.