module Data.Semiring.Helpers where cartesian as bs = [(a,b) | a <- as, b <- bs]