[][src]Trait fortraith::top

pub trait top {
    type Result;
}

Get the top element

Examples

WARNING! This effectively discards the stack, so it should only be used with the return statement

forth!(
    10
    return type Out1 as top
    1 + top
    return type Out2
);
type Out3 = forth!(9 top return);
assert_eq!(Out1::eval(), 10);
assert_eq!(Out2::eval(), 11);
assert_eq!(Out3::eval(), 9);

Associated Types

type Result

Loading content...

Implementors

Loading content...