diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-04 21:49:26 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-10-04 21:49:26 -0500 |
| commit | 70ea599b6e0787102f12cd543dcd65a2eb3751d5 (patch) | |
| tree | 81e43e09ed4f56f9290cc765e0f57dd35de02a5d /go/src/step1_read_print | |
| parent | 45e1db6afbb0c63b1cd5d17e0996d7929803f37b (diff) | |
| download | mal-70ea599b6e0787102f12cd543dcd65a2eb3751d5.tar.gz mal-70ea599b6e0787102f12cd543dcd65a2eb3751d5.zip | |
go: step1_read_print print working.
Diffstat (limited to 'go/src/step1_read_print')
| -rw-r--r-- | go/src/step1_read_print/step1_read_print.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/go/src/step1_read_print/step1_read_print.go b/go/src/step1_read_print/step1_read_print.go index 60a06cb..1f020af 100644 --- a/go/src/step1_read_print/step1_read_print.go +++ b/go/src/step1_read_print/step1_read_print.go @@ -11,6 +11,7 @@ import ( import ( "types" "reader" + "printer" ) // read @@ -25,7 +26,7 @@ func EVAL(ast types.MalType, env string) (types.MalType, error) { // print func PRINT(exp types.MalType) (types.MalType, error) { - return exp, nil + return printer.Pr_str(exp, true), nil } // repl @@ -55,6 +56,6 @@ func main() { fmt.Printf("Error: %v\n", e) continue } - fmt.Printf("%#v\n", out) + fmt.Printf("%v\n", out) } } |
