# Using a list as argument to a procedure which needs separate arguments -- "unwrapping a list"

**URL:** <https://racket.discourse.group/t/using-a-list-as-argument-to-a-procedure-which-needs-separate-arguments-unwrapping-a-list/4044>\
**Category:** Questions & Answers\
**Created:** [December 12, 2025, 1:32pm UTC](https://racket.discourse.group/t/using-a-list-as-argument-to-a-procedure-which-needs-separate-arguments-unwrapping-a-list/4044 "2025-12-12T13:32:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![meijeru](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/meijeru/32/2518_2.png) [@meijeru](https://racket.discourse.group/u/meijeru)\
**Post date:** [December 12, 2025, 1:32pm UTC](https://racket.discourse.group/t/using-a-list-as-argument-to-a-procedure-which-needs-separate-arguments-unwrapping-a-list/4044/1 "2025-12-12T13:32:29Z")

</div>

I would like to have the procedures min/max work on LISTS of numbers rather than on a series of individual numbers. Thus: (min '[3 1 2 0]) = 0, where now I have to write (min 3 1 2 0). This is all fine for literal series of arguments, but when the argument is a computed list, I would like to be able to "unwrap" the list so that it fits the syntax for min/max. I haven't found this so far.

---

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [December 12, 2025, 1:49pm UTC](https://racket.discourse.group/t/using-a-list-as-argument-to-a-procedure-which-needs-separate-arguments-unwrapping-a-list/4044/2 "2025-12-12T13:49:55Z")

</div>

It sounds like you want [`apply`](https://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._apply%29%29).

```scheme
(define xs (list 1 2 3))
(apply min xs) ; => 1
(apply max xs) ; => 3

```

---

<div class="post-metadata">

**Author:** ![meijeru](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/meijeru/32/2518_2.png) [@meijeru](https://racket.discourse.group/u/meijeru)\
**Post date:** [December 12, 2025, 2:07pm UTC](https://racket.discourse.group/t/using-a-list-as-argument-to-a-procedure-which-needs-separate-arguments-unwrapping-a-list/4044/3 "2025-12-12T14:07:12Z")

</div>

Right! Just what I needed, but could not immediately find. Tx a lot.
