Skip to content

Opperations applicable to most types

tim-hardcastle edited this page Nov 24, 2025 · 2 revisions

The following operators and functions all come as standard for all types except error and func.

  • Comparison using == and !=.
  • The type function (works with func).
  • The in operator (works with func).
  • The literal function.
  • The string function.

Let's demonstrate them in the TUI:

image

The in operator also works for membership of lists, sets, and tuples, as we will discuss when we introduce those types.

Comparison is always by value: e.g. two lists are equal if and only if they have the same elements in the same order.

🧿 Pipefish

Clone this wiki locally