Renamed 'pp' to 'puts'.

This commit is contained in:
yhirose 2015-07-08 13:15:41 -04:00
parent ff6231bcbe
commit 8039e65143
4 changed files with 9 additions and 9 deletions

View File

@ -260,7 +260,7 @@ struct Environment
void setup_built_in_functions() { void setup_built_in_functions() {
initialize( initialize(
"pp", "puts",
Value(Value::FunctionValue { Value(Value::FunctionValue {
{ {"arg", true} }, { {"arg", true} },
[](std::shared_ptr<Environment> env) { [](std::shared_ptr<Environment> env) {

View File

@ -12,6 +12,6 @@ make_func = fn (mut x) {
f = make_func(10) f = make_func(10)
pp("1: { f() }") puts("1: { f() }")
pp("2: { f() }") puts("2: { f() }")
pp("3: { f() }") puts("3: { f() }")

View File

@ -12,6 +12,6 @@ fib = fn (x) {
mut i = 0 mut i = 0
while i < 30 { while i < 30 {
pp("{i}: {fib(i)}") puts("{i}: {fib(i)}")
i = i + 1 i = i + 1
} }

View File

@ -5,13 +5,13 @@
mut i = 1 mut i = 1
while i < 24 { while i < 24 {
if i % 15 == 0 { if i % 15 == 0 {
pp('FizzBuzz') puts('FizzBuzz')
} else if i % 5 == 0 { } else if i % 5 == 0 {
pp('Buzz') puts('Buzz')
} else if i % 3 == 0 { } else if i % 3 == 0 {
pp('Fizz') puts('Fizz')
} else { } else {
pp(i) puts(i)
} }
i = i + 1 i = i + 1
} }