def funcPrintline(*arg): output = [] for val in arg: output.append(printer.print_str(val, False)) results = " ".join(output) print(results) return None
def quasiquote(a): print("QUASIQUOTING: {}".format(printer.print_str(a))) if not is_pair(a): return mytypes.MalList([mytypes.MalSymbol("quote"), a]) elif a.content[0].content == "unquote": print("Found unquote") return a.content[1] elif is_pair(a.content[0] ) and a.content[0].content[0].content == "splice-unquote": return mytypes.MalList([ mytypes.MalSymbol("concat"), a.content[0].content[1], quasiquote(mytypes.MalList(a.content[1:])) ]) else: return mytypes.MalList([ mytypes.MalSymbol("cons"), quasiquote(a.content[0]), quasiquote(mytypes.MalList(a.content[1:])) ])
def PRINT(arg): return printer.print_str(arg, True)
def fn_print(a): print("OUTPUT: " + printer.print_str(a)) return mytypes.MalNil()
def PRINT(input): '''Processes its input for print to the console''' return printer.print_str(input)
def PRINT(expr): return printer.print_str(expr)
def funcStr(*arg): output = [] for val in arg: output.append(printer.print_str(val, False)) return "".join(output)
def PRINT(ast, print_readably=True): return printer.print_str(ast, print_readably=print_readably)