Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can `forP` be executed in an action?

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

like image 200
adius Avatar asked Dec 20 '25 07:12

adius


1 Answers

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)
like image 144
adius Avatar answered Dec 22 '25 11:12

adius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!