Created
August 13, 2017 14:38
-
-
Save aspnetde/f5ccb902b620322bb009e18261cb01cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Foo | |
module Bar = | |
let RelationsReducer (state:RelationState) action = | |
match action with | |
| ActivitiesRequestSucceeded (id, items) | |
-> { state with FacilityActivity = state.FacilityActivity |> Array.filter (fun (f, _) -> f <> id) | |
|> Array.append (items |> Array.map (fun item -> (id, item.Id))) } | |
| _ -> state | |
Extract variable:
match action with
| ActivitiesRequestSucceeded (id, items) ->
let facilityActivity =
state.FacilityActivity
|> Array.filter (fun (f, _) -> f <> id)
|> Array.append (items |> Array.map (fun item -> (id, item.Id)))
{ state with FacilityActivity = facilityActivity }
| _ -> state
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks guys. I will have a chat with my Rider configuration, which doesn't seem to like this kind of indentation, which brought the question up in the first place.