[{"name":"AndCollect","comment":"\n\n@docs custom\n\n","unions":[],"aliases":[],"values":[{"name":"custom","comment":" Example usage:\n\n    module RemoteData.Extra exposing (andCollect)\n\n    import AndCollect\n    import RemoteData exposing (RemoteData)\n\n    andCollect :\n        (a -> RemoteData e b)\n        -> RemoteData e a\n        -> RemoteData e ( a, b )\n    andCollect callback oldRemoteData =\n        AndCollect.custom\n            RemoteData.andThen\n            RemoteData.map\n            callback\n            oldRemoteData\n\nYou may then use RemoteData.Extra.andCollect by turning code such as this...\n\n    import RemoteData\n\n    getRemoteAnswer : RemoteData error Int\n    getRemoteAnswer =\n        getA\n            |> RemoteData.andThen\n                (\\a ->\n                    getB a\n                        |> RemoteData.andThen\n                            (\\b ->\n                                getC a b\n                                    |> remoteData.andThen\n                                        (\\c ->\n                                            solve a b c\n                                        )\n                            )\n                )\n\n...into this:\n\n    import RemoteData\n    import RemoteData.Extra as RemoteData\n\n    getRemoteAnswer : RemoteData error Int\n    getRemoteAnswer =\n        getA\n            |> RemoteData.andCollect getB\n            |> RemoteData.andCollect (\\( a, b ) -> getC a b)\n            |> RemoteData.andThen (\\( ( a, b ), c ) -> solve a b c)\n\n(The LSP's inferred signature was used. Feedback or experimentation should be gathered to ensure the lack of higher-kinded types aren't causing any weird gotchas.)\n\n","type":"((a -> mb) -> ma -> mab) -> ((x -> ( a, x )) -> b -> mb) -> (a -> b) -> ma -> mab"}],"binops":[]},{"name":"Maybe.AndCollect","comment":"\n\n@docs andCollect\n\n","unions":[],"aliases":[],"values":[{"name":"andCollect","comment":" Combinator for interdependent `Maybe` values. Note the type signature similarities with `Maybe.andThen`:\n\n    andThen : (a -> Maybe b) -> Maybe a -> Maybe b\n\n    andCollect : (a -> Maybe b) -> Maybe a -> Maybe ( a, b )\n\nIntended usage is turning interdependent `Maybe` values such as this...\n\n    computeAnswer : Maybe Int\n    computeAnswer =\n        getA\n            |> Maybe.andThen\n                (\\a ->\n                    getB a\n                        |> Maybe.andThen\n                            (\\b ->\n                                getC a b\n                                    |> Maybe.andThen\n                                        (\\c ->\n                                            solve a b c\n                                        )\n                            )\n                )\n\n... into this:\n\n    import Maybe.AndCollect as Maybe\n\n    computeAnswer : Maybe Int\n    computeAnswer =\n        getA\n            |> Maybe.andCollect getB\n            |> Maybe.andCollect (\\( a, b ) -> getC a b)\n            |> Maybe.andThen (\\( ( a, b ), c ) -> solve a b c)\n\n","type":"(a -> Maybe.Maybe b) -> Maybe.Maybe a -> Maybe.Maybe ( a, b )"}],"binops":[]},{"name":"Result.AndCollect","comment":"\n\n@docs andCollect\n\n","unions":[],"aliases":[],"values":[{"name":"andCollect","comment":" Combinator for interdependent `Result` values. Note the type signature similarities with `Result.andThen`:\n\n    andThen : (a -> Result e b) -> Result e a -> Result e b\n\n    andCollect : (a -> Result e b) -> Result e a -> Result e ( a, b )\n\nIntended usage is turning interdependent `Result` values such as this...\n\n    computeAnswer : Result error Int\n    computeAnswer =\n        getA\n            |> Result.andThen\n                (\\a ->\n                    getB a\n                        |> Result.andThen\n                            (\\b ->\n                                getC a b\n                                    |> Result.andThen\n                                        (\\c ->\n                                            solve a b c\n                                        )\n                            )\n                )\n\n... into this:\n\n    import Result.AndCollect as Result\n\n    computeAnswer : Result error Int\n    computeAnswer =\n        getA\n            |> Result.andCollect getB\n            |> Result.andCollect (\\( a, b ) -> getC a b)\n            |> Result.andThen (\\( ( a, b ), c ) -> solve a b c)\n\n","type":"(a -> Result.Result e b) -> Result.Result e a -> Result.Result e ( a, b )"}],"binops":[]},{"name":"Task.AndCollect","comment":"\n\n@docs andCollect\n\n","unions":[],"aliases":[],"values":[{"name":"andCollect","comment":" Combinator for interdependent `Task` values. Note the type signature similarities with `Task.andThen`:\n\n    andThen : (a -> Task e b) -> Task e a -> Task e b\n\n    andCollect : (a -> Task e b) -> Task e a -> Task e ( a, b )\n\nIntended usage is turning interdependent `Task` values such as this...\n\n    computeAnswer : Task error Int\n    computeAnswer =\n        getA\n            |> Task.andThen\n                (\\a ->\n                    getB a\n                        |> Task.andThen\n                            (\\b ->\n                                getC a b\n                                    |> Task.andThen\n                                        (\\c ->\n                                            solve a b c\n                                        )\n                            )\n                )\n\n... into this:\n\n    import Task.AndCollect as Task\n\n    computeAnswer : Task error Int\n    computeAnswer =\n        getA\n            |> Task.andCollect getB\n            |> Task.andCollect (\\( a, b ) -> getC a b)\n            |> Task.andThen (\\( ( a, b ), c ) -> solve a b c)\n\n","type":"(a -> Task.Task e b) -> Task.Task e a -> Task.Task e ( a, b )"}],"binops":[]}]