> For the complete documentation index, see [llms.txt](https://katxupa.gitbook.io/katxupa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://katxupa.gitbook.io/katxupa/get-a-taste-of-katxupa/usage/global-utility-functions.md).

# Global Utility Functions

Global functions are the unsung heroes that transcend the boundaries of specific data types, providing a universal toolkit for developers. These functions, residing in the global scope, are the go-to tools when you need versatile and expressive solutions that operate seamlessly across various data structures.

## **Meet some Ingredients**

* [**runIt()**](/katxupa/get-a-taste-of-katxupa/usage/scope-functions/functions/runit.md): The maestro orchestrating the symphony of functions, *runIt* calls a specified function block and presents its harmonious result.
* [**withIt()**](/katxupa/get-a-taste-of-katxupa/usage/scope-functions/functions/withit.md): The chameleon of functions, *withIt* transforms any object into the star of the show, letting it shine in a function block tailored just for them.
* **listOf()** and **setOf()**: Assemble an immutable collection of elements effortlessly with *listOf* or *setOf*. It's your go-to for creating collections in a concise and readable manner.
* **mutableListOf()** or **mutableSetOf()**: When you need a dynamic collection that can evolve with your needs, turn to *mutableListOf* or *mutableSetOf* to create mutable collection with ease.
* [**optionalOf()**](/katxupa/get-a-taste-of-katxupa/dip-dive/optional.md#optionalof): Embrace the power of optionals with *optionalOf*, a function that lets you gracefully handle scenarios with potentially absent values.
* [**durationOf()**](/katxupa/get-a-taste-of-katxupa/dip-dive/duration.md#durationof): Time is of the essence, and *durationOf* allows you to craft time durations with precision, making time manipulation a breeze.
* [**reducerOf()**](/katxupa/get-a-taste-of-katxupa/dip-dive/reducer.md#reducerof): Transform your data with *reducerOf*, a function designed for building reducers that streamline complex state transformations in a functional paradigm.
* [**rangeTo()**](/katxupa/get-a-taste-of-katxupa/dip-dive/range.md#rangeto): Define ranges effortlessly with *rangeTo*, a function simplifying the creation of numeric ranges for iteration or data selection.
* [**ok()**](/katxupa/get-a-taste-of-katxupa/usage/result.md): Indicate success with confidence using *ok*. This function constructs an "ok" result, signalling that a task or operation was completed successfully.
* [**error()**](/katxupa/get-a-taste-of-katxupa/usage/result.md): Handle errors gracefully with *error*. This function constructs an error result, encapsulating details about the failure and allowing for structured error handling.

These are just a smell of the utility this library brings to the table. Please, check the complete list in the [Global Functions](https://manusant.github.io/Katxupa/) section.

<br>
