[FRIAM] How is a vector space like an evolutionary function?

jon zingale jonzingale at gmail.com
Thu Aug 6 11:30:30 EDT 2020


For those algorithmically inclined readers, I coded up the examples in
Haskell. While the soberSort, keyShuffle, and compositeSort could each
be written in a few lines, I took the time to build out a KeySortable
type class and wrote the examples relative to it. There are 4 files
involved: Spandel.hs, MixedSpandrel.hs, Shape.hs, and Sortable.hs

The first two simply implement the examples. Shape.hs defines a notion
of ordered shapes and provides a generator for producing random lists
of shapes. Sortable.hs has the class implementation details. There you
will find that I have defined a _Pair_ datatype and then extend the Ord
class to it (ordering based on the first in the pair, the 'primary
phenomena') and to the Bifunctor class. Lastly, I define a KeySortable
class, contingent on Bifunctor, and extend it to include _Pair_. Aside
from the class constraint, creating an instance of KeySortable needs
the usual product maps (η, 𝜀), but then gets _sort_ and _shuffle_ for
free. For interested readers, the code can be found here:

https://github.com/jonzingale/Haskell/tree/master/epiphenomena




--
Sent from: http://friam.471366.n2.nabble.com/



More information about the Friam mailing list