From a70af22eaf0a1ea01a6aecc8c28ecbbb3345b2a8 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Thu, 2 Jul 2009 19:26:25 +0000 Subject: [PATCH] Add initial pair printing --- chaiscript/chaiscript_prelude.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chaiscript/chaiscript_prelude.hpp b/chaiscript/chaiscript_prelude.hpp index 687073a5..1deaf5f3 100644 --- a/chaiscript/chaiscript_prelude.hpp +++ b/chaiscript/chaiscript_prelude.hpp @@ -5,6 +5,9 @@ #define CHAISCRIPT_PRELUDE_HPP_ const char *chaiscript_prelude = " \n\ +def to_string(x) : call_exists(first, x) && call_exists(second, x) { \n\ + \"<\" + x.first.to_string() + \", \" + x.second.to_string() + \">\"\n\ +}\n\ def to_string(x) : call_exists(range, x) { \n\ \"[\" + x.join(\", \") + \"]\"\n\ }\n\