Extra Features
This commit is contained in:
@@ -10,7 +10,7 @@ let book = {
|
||||
let printBookName = fn(book) {
|
||||
let title = book["title"];
|
||||
let author = book["author"];
|
||||
puts(author + " - " + title);
|
||||
print(author + " - " + title);
|
||||
};
|
||||
|
||||
printBookName(book);
|
||||
|
||||
@@ -8,4 +8,4 @@ let fib = fn(x) {
|
||||
return fib(x-1) + fib(x-2)
|
||||
}
|
||||
|
||||
puts(fib(35))
|
||||
print(fib(35))
|
||||
@@ -8,4 +8,4 @@ let fib = fn(n, a, b) {
|
||||
return fib(n - 1, b, a + b)
|
||||
}
|
||||
|
||||
puts(fib(35, 0, 1))
|
||||
print(fib(35, 0, 1))
|
||||
3
examples/input.monkey
Normal file
3
examples/input.monkey
Normal file
@@ -0,0 +1,3 @@
|
||||
let name = input("What is your name? ")
|
||||
|
||||
print("Hello " + name)
|
||||
Reference in New Issue
Block a user