> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/sass/list/list.from.md).

# list.from()

The `list.from()` function returns the list of elements from index [`$from`](#usdfrom) to the end of [`$list`](#usdlist).

{% code lineNumbers="true" %}

```scss
// Sass.
@use 'sass:list';

// Functions.
@use 'list.nth.function' as *;

// Modules.
@use '../number';

// The `list.from()` function.
@function from($list, $from) {
  $result: nth($list, number.range($from, list.length($list)) or $from...);
  @return if(
    $from <= list.length($list),
    if(list.length($list) == $from, ($result,), $result),
    null
  );
}
```

{% endcode %}

{% embed url="<https://github.com/angular-package/sass/blob/main/list/_list.from.function.scss>" %}

### Parameters

#### **`$list`**&#x20;

The list from which the elements are picked.

#### `$from`

A number-type element index of [`$list`](#usdlist).

### Return

The return value is the list of elements from index [`$from`](#usdfrom) to the last index of [`$list`](#usdlist).

## Examples

```scss
// Use.
@use 'angular-package/sass/list';

// Examples.
@debug list.from((('a', 'b', 'c'),), 1); // (('a', 'b', 'c'),)

@debug list.from((('a', 'b', 'c'), 'a', 'b', c, d, 2, 4, 5, (a: 1)), 0); // ("a", "b", "c"), "a", "b", c, d, 2, 4, 5, (a: 1)
@debug list.from((('a', 'b', 'c'), 'a', 'b', c, d, 2, 4, 5, (a: 1)), -1); // (a: 1), ("a", "b", "c"), "a", "b", c, d, 2, 4, 5, (a: 1)
@debug list.from((('a', 'b', 'c'), 'a', 'b', c, d, 2, 4, 5, (a: 1)), 1); // ("a", "b", "c"), "a", "b", c, d, 2, 4, 5, (a: 1)

@debug list.from(('a', 'b', c, d, 2, 4, 5, (a: 1)), 4); // d, 2, 4, 5, (a: 1)
@debug list.from(('a', 'b', c, d, 2, 4, 5, (a: 1)), 7); // 5, (a: 1)

// negative index
@debug list.from((('a', 'b', 'c'), ), -3); // null, null, ("a", "b", "c"), ("a", "b", "c")

```
