NOTE: the latest version is 11.2.0
Dict operations that can be applied in either Direction
Dict
Direction
Reduce { key, value }-entries in a given Direction from a given initial accumulated thing
{ key, value }
import Linear exposing (Direction(..)) import Dict Dict.fromList [ ( "Dies", 39 ), ( "Wonu", 22 ), ( "Eorfe", 18 ) ] |> Dict.Linear.foldFrom [] Up (\user -> (::) user.key) --> [ "Wonu", "Eorfe", "Dies" ] Dict.fromList [ ( "Dies", 39 ), ( "Wonu", 22 ), ( "Eorfe", 18 ) ] |> Dict.Linear.foldFrom [] Down (\user -> (::) user.key) --> [ "Dies", "Eorfe", "Wonu" ]
To allow any key, try elm-keysset
elm-keysset
Reduce
{ key, value }-entries in a givenDirectionfrom a given initial accumulated thing