Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

lnsp/tea-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tea

Build Status

Careful! This project is deprecated and no longer in development. Refer to the Go implementation for a more recent version.

Code written in Tea is simple and small, even Tea itself is short (less than 3000 lines of code). It was crafted for reading, extending and maintaining.

How about a little taste of Tea?

// tasty.tea
import std.io;

func greet(greeting, name: string): string {
    return "%s, %s!" % [greeting, name];
}

io.println("You called", args.join(","));
io.print("Please enter your name: ");
var name: string = io.readln();

if (length(trim(name)) == 0) {
    io.println("Ok, I won't greet you :(");
} else {
    io.print("How many times? ");
    var times: int = io.readln();
    
    for (i: int = 0; i < times; i += 1) {
        print(greet("Hello", name));
    }
}