You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The standard library is missing sorting functionality. This needs to be rectified.
Describe the solution you'd like
I suggest adding two functions to the array.ab file:
/// Sort the array in-place.
/// Pass `human` value `true` for human readable sort.
pub fun sort(ref array: [], human: Bool = false): Null {
array = sorted(array)
}
/// Return the sorted array, leaving the original array unchanged.
/// Pass `human` value `true` for human readable sort.
pub fun sorted(array: [], human: Bool = false): [] {
...
}
Describe alternatives you've considered
N/A
Additional context
I suggest using the Bash sort command, with option -V for human readable sort. This reads standard input and writes standard output.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The standard library is missing sorting functionality. This needs to be rectified.
Describe the solution you'd like
I suggest adding two functions to the
array.ab
file:Describe alternatives you've considered
N/A
Additional context
I suggest using the Bash
sort
command, with option-V
for human readable sort. This reads standard input and writes standard output.The text was updated successfully, but these errors were encountered: