RSSAmplifier

Reasonably Polymorphic · May 5, 2025

Analyzing API Design via Algebraic Laws

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

The other day, someone asked: Why doesn’t [the Data.Map function] unionWith :: (a -> a -> a) -> Map k a -> Map k a -> Map k a allow for different value types the way intersectionWith :: (a -> b -> c) -> Map k a -> Map k b -> Map k c does? This is a very reasonable question, and it lead down an interesting rabbit hole of at the intersection of API design and efficient implementation. To answer the…

Read on blog/api-analysis/index.html

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.