greg
2018-4-5 13:12:39

@slack1 There is empty? (from racket/list which is in #lang racket but not #lang racket/base). I’d use that if I really just need a predicate — and one with a better name (IMHO) than null?. empty? is just an alias for null?.

But more frequently I’d use match — because frequently I want to do something in the non-empty case like bind some of the list elements to variables. And match does both in one swell foop.