Skip to content

Processing/iterating a sequence in a session #1302

@NickFoubert

Description

@NickFoubert

I'm trying to sort out how I might process the elements of a sequence in the context of a session. I've tried a couple things but I'm stumped:

  1. I tried "iterating" through a sequence using list comprehensions and 'Head but since copying sequences isn't yet supported there doesn't seem to be a way to store the Tail of a list to process the remaining elements.
  2. It appears that sequences can't be used as a function parameter, either directly or as a component of a message type.

The examples in the repo seem to only ever use the 'Head of a sequence to select the first element or some specific element using a list comprehension.

I'd like to be able to call an external function on each element of a sequence.

I suppose a workaround is to write the sequence to a channel and then have the external code re-parse the sequence?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions