Closed
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
Should take a moderate amount of time to address.Built-in commands (e.g. move, try, if, ...) in the Swarm language.The bug fix or feature would be nice but doesn't currently have much negative impact.A new feature to be added to the game.This issue is about restructuring the code without changing the behaviour to improve code quality.