Skip to content
/ maybe Public

Extends C with much-needed probabilistic flow control.

Notifications You must be signed in to change notification settings

tstein/maybe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Extends C with much-needed probabilistic flow control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages