The min monoid in js