dummy-link

AlgebraicTraits

Traits from an abstract algebra perspective

Readme

AlgebraicTraits

Build Status

Coverage Status

codecov.io

This package provides traits for algebraic structures on various operations. Being able to dispatch implementations on traits is an extremely powerful feature of Julia.

Here is a simple example. It is known that strings form a monoid under concatenation, which in Julia uses the * symbol. We may describe this using traits as such:

associativity(::Type{String}, ::typeof(*)) = Associative
closure(::Type{String}, ::typeof(*)) = Closed
identification(::Type{String}, ::typeof(*)) = Identified

From this, AlgebraicTraits can infer the monoid structure:

ismonoid(::Type{String}, ::typeof(*)) = true

This package takes an approach from the abstract algebra perspective instead of the category theory perspective.

First Commit

07/15/2016

Last Touched

almost 4 years ago

Commits

3 commits

Requires:

Used By: