An action expects a return value of Action ()
, but forP
returns an Action[()]
.
How can it be executed in an action?
Asked
Active
Viewed 45 times
3

adius
- 13,685
- 7
- 45
- 46
1 Answers
3
If the return value is irrelevant it can simply be ignored:
void $ forP commands runCommand
Otherwise it can be bound to a variable and used afterwards:
values <- forP commands runCommand
return (fold values)

adius
- 13,685
- 7
- 45
- 46