Skip to the page
aukdocs
/
Start Library Packages Errors Glossary
0 of 12 steps done

Start here

  • 1Getting started
  • 2A tour of Auk

The language

  • 3Basics
  • 4Functions, clauses and patterns
  • 5Structs, enums and shapes
  • 6Errors and optionals
  • 7Effects
  • 8Tests, contracts and holes
  • 9Modules and packages
  • 10Units of measure
  • 11Concurrency
  • 12Calling C

Tools

  • The auk command
  • raft, the package manager
  • Testing and debugging
  • Live reload
  • Editors
  • Auk with AI agents

Reference

  • Core library
  • Package catalog
  • Package docs
  • Error codes
  • Cheat sheet
  • Glossary

Working on Auk

  • Compiler architecture
  • Low-level Auk (raw)
  • raft design notes

Results for “sort_by”

4 results, best first

  1. The language › Structs, enums and shapes The built-in shapes …// true } To sort by a key without defining cmp, use sort_by; a tuple key sorts by several fields: struct P { name: str, n: int } fn main() { let ps = [P { name: "b", n: 2 }, P { name: "a", n: 2 }, P…
  2. Start here › A tour of Auk 6. Doing several things at once …10), price_from("gearhaus", 20), ] let best = quotes.sort_by(q => q.1).first() print(best) // some(("bolt-co", 10.1)) } An async fn can run as a task; await on a list runs them all concurrently.…
  3. Reference › Core library Lists …xs.reverse() xs.sort() a sorted copy; stable; needs Ord xs.sort_by(key) by a key; a tuple key sorts by several fields xs.unique() keeps the first of each xs.enum(): [(int, T)] pairs each item with…
  4. Reference › Cheat sheet Core library (always available) …group_by(key): {K: [T]} unique zip enum join(sep) · sort sort_by(key): stable sorted copies; tuples and lists compare element by element: sort_by(p => (-p.n, p.name)) · maps: remove(k): V? keys…

Auk docs · written in Auk, served live by splash.

auk-lang.org · Package registry · Glossary · Search