iyi

Prelude, 0.18.0

Struct

A struct is its fields, as the other library's Struct#== has it: two are equal when each field is. Object#== answers false, so a struct was not equal to itself - b == b was false and {b => 1}[b]? nil. Object#hash stays correct for it, one slot a type; a struct that is a key writes one.

In the prelude: every iyi program has it, with no import.

Structstruct

Structiyi doc Struct
struct Struct < Value

  def ==(other : self) : Bool
end