[][src]Trait fortraith::fact

pub trait fact {
    type Result;
}

Calculate the factorial of the top element

Yeah you don't have to write the factorial word by yourself, it's builtin thanks to trait_eval!

Examples

forth!(
    4 fact
    return type Out as top
);
assert_eq!(Out::eval(), 24);

Associated Types

type Result

Loading content...

Implementors

Loading content...