Created: 2022-02-04 10:05
Reference: Issue #276: LIMIT becomes 0 in generated SQL
Beam’s Q monad can be thought as a list, which means the order of some operations matters.
take
is equivalent to limit
offset
is equivalent to drop
λ> limit = take
λ> offset = drop
λ> offset 10 $ limit 10 $ [0..20]
[]
λ> limit 10 $ offset 10 $ [0..20]
[10,11,12,13,14,15,16,17,18,19]