---
title: "Pipe & Compose"
description: "Learn how to use pipe and compose functions in TypeScript."
date: "2025-10-02"
tags: ["typescript","pipe","compose","frontend"]
canonical: "/snippets/typescript/function/pipe"
---

import { Code } from '@astrojs/starlight/components'
import Source from './pipe.ts?raw'

## Pipe & Compose

<Code code={Source} lang="ts" title="pipe.ts" wrap />

A unary function is a function that accepts exactly one argument and can be created by calling the function with just the first argument provided.
