Skip to content

Commit

Permalink
Improve phrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaprieto committed Dec 24, 2024
1 parent 40154d6 commit df0392a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/tutorials/essential.juvix.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,10 @@ end;

In Juvix, traits provide a way to define shared behaviour for types, similarly
to traits in Rust, type classes in Haskell, and interfaces in Java. A trait
specifies a set functions that must be implemented in an instance for a given
type. Traits allow to write generic, reusable code by specifying constraints on
types without committing to a specific implementation.
defines a set of functions that must be implemented for a given type. Types that
implement a trait are called *instances* of the trait. Traits enable writing
generic, reusable code by specifying constraints on types without committing to a
specific implementation.

For example, the `Eq` trait from the standard library specifies the equality
function `Eq.eq`.
Expand Down

0 comments on commit df0392a

Please sign in to comment.