Seagate / halon

High availability solution
Apache License 2.0
1 stars 0 forks source link

Show pools in `hctl mero status` output #1456

Closed 1468ca0b-2a64-4fb4-8e52-ea5806644b4c closed 6 years ago

1468ca0b-2a64-4fb4-8e52-ea5806644b4c commented 6 years ago

Created by: vvv

1468ca0b-2a64-4fb4-8e52-ea5806644b4c commented 6 years ago

Created by: vvv

Good question! forM_ maps each element of a structure to an action, evaluates these actions from left to right, and ignores the results. In our case “the structure” is Maybe a. Without forM_ (which can be replaced with for_) we would have to use maybe function or case expression to take care of Nothing case (“take care” = return ()). The code would be less elegant.

1468ca0b-2a64-4fb4-8e52-ea5806644b4c commented 6 years ago

Created by: rajanikantchirmade

Since csrDixPool is "Maybe M0.Pool" and not list why we need to use forM_ ?