# builtins

Tea exposes a small set of global `@` intrinsics for output, script control, introspection, and math.

Examples may be fragments requiring the module import or additional setup.

## @print

```tea
@print(value: Any) -> Void
```

Write the string representation of a value to stdout.

## @println

```tea
@println(value: Any) -> Void
```

Write the string representation of a value to stdout with a newline.

```tea
@println("Hello, Tea!") # Prints: Hello, Tea!
```

## @append

```tea
@append(list: List[T], value: T) -> Void
```

Append a value to a mutable list in place.

## @to_string

```tea
@to_string(value: Any) -> String
```

Convert any value to its string representation.

## @type_of

```tea
@type_of(value: Any) -> String
```

Return the runtime type name of a value as a string.

## @panic

```tea
@panic(message: String) -> Void
```

Terminate the program immediately with an error message.

## @exit

```tea
@exit(code: Int) -> Void
```

Exit the program with the specified exit code.

## @args

```tea
@args() -> List
```

Return command-line arguments as a list of strings.

## @read_line

```tea
@read_line() -> String
```

Read a single line from stdin (without trailing newline).

## @read_all

```tea
@read_all() -> String
```

Read all content from stdin as a string.

## @eprint

```tea
@eprint(value: Any) -> Void
```

Print a value to stderr without a trailing newline.

## @eprintln

```tea
@eprintln(value: Any) -> Void
```

Print a value to stderr with a trailing newline.

## @is_tty

```tea
@is_tty() -> Bool
```

Return true if stdin is connected to an interactive terminal.

## @len

```tea
@len(value: Any) -> Int
```

Return the number of elements in a String, List, or Dict.

## @floor

```tea
@floor(value: Float) -> Int
```

Round a float down to the nearest integer.

## @ceil

```tea
@ceil(value: Float) -> Int
```

Round a float up to the nearest integer.

## @round

```tea
@round(value: Float) -> Int
```

Round a float to the nearest integer.

## @abs

```tea
@abs(value: Float) -> Float
```

Return the absolute value of a float.

## @sqrt

```tea
@sqrt(value: Float) -> Float
```

Return the square root of a float.

## @max

```tea
@max(left: Float, right: Float) -> Float
```

Return the maximum of two floats.

## @min

```tea
@min(left: Float, right: Float) -> Float
```

Return the minimum of two floats.
