Function Function.withBody

Return a new Function object with the body_ attribute set to value.

immutable(Function) withBody (
  string value
) immutable;

Example

pure int answer();
mixin(
    refract!(answer, "answer").withName("theAnswer")
    .withBody("{ return 42; }")
    .mixture);
static assert(theAnswer() == 42);