Skip to content

Change meetAll to return a list #1998

Closed
@byorgey

Description

As implemented in #920 , and as discussed at #306, the meetAll command currently has type

meetAll : (b -> Actor -> Cmd b) -> b -> Cmd b

i.e. you give it a callback function which will be run on every nearby robot. However, now that we have recursive types (#1894) we should consider changing it to just return a list of robots, i.e.

meetAll : Cmd (rec l. Unit + Actor * l)

This would make the command simpler to use and would also allow us to remove some complex CESK machinery (we currently need some special states just to implement this command!).

Metadata

Assignees

Labels

C-Moderate EffortShould take a moderate amount of time to address.L-CommandsBuilt-in commands (e.g. move, try, if, ...) in the Swarm language.S-Nice to haveThe bug fix or feature would be nice but doesn't currently have much negative impact.Z-FeatureA new feature to be added to the game.Z-RefactoringThis issue is about restructuring the code without changing the behaviour to improve code quality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions