Skip to content

Releases: elmcraft/core-extra

2.1.0

21 Sep 15:42
Compare
Choose a tag to compare

Highlights

We've added a brand new Triple.Extra module to match Tuple.Extra!

We've also added a number of new utility functions:

  • Dict.Extra.invertAll
  • Dict.Extra.updateIfExists
  • Dict.Extra. upsert
  • Float.Extra.equalWithin
  • Float.Extra.interpolateFrom
  • List.Extra.conditional
  • List.Extra.cons
  • Set.Extra.all
  • Set.Extra.any

Details

Full Changelog

ADDED MODULES

Triple.Extra

Dict.Extra

Added:
    invertAll :
        Dict.Dict comparable1 comparable2
        -> Dict.Dict comparable2 (Set.Set comparable1)
    updateIfExists :
        comparable
        -> (a -> a)
        -> Dict.Dict comparable a
        -> Dict.Dict comparable a
    upsert :
        comparable
        -> a
        -> (a -> a)
        -> Dict.Dict comparable a
        -> Dict.Dict comparable a

Float.Extra

Added:
    equalWithin :
        Basics.Float -> Basics.Float -> Basics.Float -> Basics.Bool
    interpolateFrom :
        Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float

List.Extra

Added:
    conditional : List.List ( a, Basics.Bool ) -> List.List a
    cons : ( a, List.List a ) -> List.List a

Set.Extra

Added:
    all : (a -> Basics.Bool) -> Set.Set a -> Basics.Bool
    any : (a -> Basics.Bool) -> Set.Set a -> Basics.Bool

2.0.0

24 Feb 16:39
3598e8f
Compare
Choose a tag to compare

V2 is the same as the initial release, but merely removes all deprecated functions:

Array.Extra:
- apply : Array (a -> b) -> Array a -> Array b
- interweave : Array a -> Array a -> Array a

Basics.Extra:
- atLeast : comparable -> comparable -> comparable
- atMost : comparable -> comparable -> comparable
- fractionalModBy : Float -> Float -> Float
- orderBy : List (a -> a -> Order) -> a -> a -> Order
- swap : ( a, b ) -> ( b, a )
- toOrder : (a -> comparable) -> a -> a -> Order
- toOrderDesc : (a -> comparable) -> a -> a -> Order

Dict.Extra:
- fromListDedupe : (a -> a -> a) -> List ( comparable, a ) -> Dict comparable a
- fromListDedupeBy : (a -> a -> a) -> (a -> comparable) -> List a -> Dict comparable a
- insertDedupe : (v -> v -> v) -> comparable -> v -> Dict comparable v -> Dict comparable v

List.Extra:
- filterNot : (a -> Bool) -> List a -> List a

Maybe.Extra:
- traverse : (a -> Maybe b) -> List a -> Maybe (List b)
- traverseArray : (a -> Maybe b) -> Array a -> Maybe (Array b)

Result.Extra:
- singleton : a -> Result e a

Set.Extra:
- subset : Set comparable -> Set comparable -> Bool

String.Extra:
- removeAccents : String -> String

Tuple.Extra:
- sequenceFirstMaybe : ( Maybe a, b ) -> Maybe ( a, b )
- sequenceMaybe : ( Maybe a, Maybe b ) -> Maybe ( a, b )
- sequenceSecondMaybe : ( a, Maybe b ) -> Maybe ( a, b )

1.0.0

23 Feb 14:27
77ee5fb
Compare
Choose a tag to compare

Initial release.

This incorporates a number of initial source code from a large number of source, and includes some original work by the new maintainers.