Skip to content

Tutorial: Sort Order

molarmanful edited this page Nov 4, 2023 · 5 revisions

When performing comparisons, sclin decides sort order as follows:

  • UN
  • $F
  • Noncomparable falsy values
  • Comparable values:
    • NUMs and DBLs compare numerically.
    • STR-like and SEQ-like types:
      • Falsy values equal NUM(0) during comparison.
      • Other values compare lexicographically.
    • With mixed-type comparisons, STR-like/SEQ-like values take precedence (i.e. NUMs/DBLs convert accordingly).
    • Other types convert to $T or $F depending on their truthiness.
  • Noncomparable truthy values
  • $T

Clone this wiki locally