# Functions
All returns true if all the given predicate evaluations evaluate to condition.
AllFalse returns true if all the given predicate evaluations is false.
AllTrue returns true if all the given predicate evaluations are true.
CopyMap copies all key/value pairs in source adding them to destination.
DefensiveCopy returns a defensive copy of a slice.
DefineLazy returns a Lazy[T] that will call the given function to calculate the value.
DurationValue returns the value of a duration in the given time unit.
Filter filters a slice using a predicate function.
FindIndex returns the first index i satisfying predicate(s[i]).
GroupBy groups the elements of a slice by a key function.
Has returns true if any of the given predicate evaluations is condition.
HasFalse returns true if any of the given predicate evaluations evaluate to false.
HasTrue returns true if any of the given predicate evaluations evaluate to true.
Haversine calculates the distance between two locations using the Haversine formula.
Intersect returns the intersection of two slices.
Keys returns a slice of all values in the given map.
Map maps a slice of type T to a slice of type R using the function f.
MapSlice maps a slice of type T to a slice of type R using the function f returning a slice of R.
NewAlias creates a new Alias from the given weights.
NewDistance returns a new distance.
NewDuration returns a new duration by unit.
NewFastHaversine returns a new FastHaversine.
NewInvalidLocation creates a new invalid Location.
NewLocation creates a new Location.
NewSpeed creates a new speed.
NewSpeedUnit returns a new speed unit.
NewStatistics creates a new statistics object.
NotUnique returns the duplicate instances.
NotUniqueDefined returns the instances for which f returns identical values.
NSmallest returns the n-smallest items in the slice items using the function f to determine the value of each item.
RandomElement returns a random element from the given slice.
RandomElementIndices returns a slice of n random element indices from the given slice.
RandomElements returns a slice of n random elements from the given slice.
RandomIndex returns a random index from the given size.
RangeMap ranges over a map in deterministic order by first sorting the keys.
Reverse reverses the given slice in place and returns it.
Shuffle returns a shuffled copy of the given slice.
Truncate truncates a float64 to the given unit.
Unique is a universal duplicate removal function for type instances in a slice that implement the comparable interface.
UniqueDefined is a universal duplicate removal function for type instances in a slice that implement the comparable interface.
Values returns a slice of all values in the given map.
WithinTolerance returns true if a and b are within the given tolerance.
# Constants
Day is 24 hours.
Hour is 60 minutes.
Kilometers is 1000 meters.
Meters is the distance travelled by light in a vacuum in 1/299,792,458 seconds.
MicroSecond is 1/1,000,000 of a second.
Miles is 1609.34 meters.
MilliSecond is 1/1,000 of a second.
Minute is 60 seconds.
NanoSecond is 1/1,000,000,000 of a second.
Second is the SI unit of time.
# Variables
KilometersPerHour is a speed unit of kilometers per hour.
MetersPerSecond is a speed unit of meters per second.
MilesPerHour is a speed unit of miles per hour.
# Structs
Distance is a distance in a given unit.
FastHaversine is a fast approximation of the haversine distance.
Statistics describes statistics.
# Interfaces
Alias is an interface that allows for sampling from a discrete distribution in O(1) time.
Comparable is a type constraint for three types: int, int64, and string.
Location represents a physical location on the earth.
Speed is the interface for a speed.
SpeedUnit represents a unit of speed.
# Type aliases
DistanceUnit is the unit of distance.
DurationUnit is the unit of duration.
Lazy is a function that returns a value of type T.
Locations is a slice of Location.