Index: polemy/eval.d ================================================================== --- polemy/eval.d +++ polemy/eval.d @@ -70,10 +70,13 @@ if( auto ft = cast(FunValue)args[1] ) if( auto fe = cast(FunValue)args[2] ) return (x.data == 0 ? fe : ft).call(pos,lay,[]); throw genex!RuntimeException(pos, "type mismatch in if"); })); + ctx.set("_isint", "@v", native( (Value v){return new IntValue(BigInt(cast(IntValue)v is null ? 0 : 1));} )); + ctx.set("_isstr", "@v", native( (Value v){return new IntValue(BigInt(cast(StrValue)v is null ? 0 : 1));} )); + ctx.set("_isfun", "@v", native( (Value v){return new IntValue(BigInt(cast(FunValue)v is null ? 0 : 1));} )); return ctx; } /// Entry point of this module