Follow.Middlewares.Sort

Description

This middleware allows to sort the directory entries according to a comparison function. The comparison function has a type Entry -> Entry -> Ordering.

Some pre-built comparison function builders are also exported. Example:

import Follow
import Follow.Middlewares.Sort

-- Suppose we have a Directory d

apply (byGetter eTitle) d

Synopsis

# Documentation

Middleware to sort a directory according to a given comparison function.

Creates a comparison function that sorts by the values returned by a getter

Function to compare entries.