Skip to main content

Flat Map

Map a function over a list and flatten the result

Holly Conrad Smith avatar
Written by Holly Conrad Smith
Updated over 2 weeks ago

Inputs

Name

Abbreviation

Type

Access

Description

List

L

Any

List

The list to map and flatten

Return Value

R

Any

Item

The item to return in the current loop

Outputs

Name

Abbreviation

Type

Access

Description

Result

R

Any

List

The flattened result of the map

Value

V

Any

Item

The value of the map

Index

I

Number

Item

The index of the map

How-to

  1. Feed in a list

    Lists have 2 or more items contained within the list object.

    (If you do not have a list, map is unnecessary - just feed the single geometry directly into the next node function)

  2. Create your set of instructions as you typically would for a single object.

    Feed the V output into your function.

  3. End the loop

    Feed the output of the function into the R input.

    The resulting list is then flattened.

  4. The output of the Map is a flattened list of items that have had your function applied.

Did this answer your question?