Updated after excellent feedback from @johnmyleswhite and @lindahua:
julia naming convention;
use keyword arguments and adapt docs;
use StatsBase for binomial sampling;
refactor checkrule();
add test for approx equality of minima in addition to cardinality;
added (three forms of) a test function;