~/talk

Monoids, Predicates and Sorting Functions!

Talkat Functional Swift Conference 2017 · on Saturday, 2017-04-15· [swift]
slides:none on file

Live coding shows Swift protocols for Semigroup and Monoid with a concrete monoid identity and a generic can-cat fold, builds an endo monoid of functions (compose and identity), and lifts any Monoid to functions A -> M to make predicates and comparators monoids. An ordering monoid (LT EQ GT) plus a lens-to-comparator glue yields composable multi-key sorters that can be reversed and concatenated, demonstrated on a projects array, and claimed to be used in a real codebase.

AI-written summary · about

  1. 0:00Introduction to monoids
  2. 1:06Defining semigroups
  3. 3:33Concatenation and folding
  4. 5:43Monoids and identity
  5. 7:20Endomorphisms as monoids
  6. 11:28Function mapping monoids
  7. 15:16Predicates as monoids
  8. 18:26The ordering monoid
  9. 20:12Comparators for sorting
  10. 25:05Lenses and complex sorting
  11. 32:25Q&A and closing thoughts
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.