Thanks! I thought pattern matching or case analysis wouldn't work well with functions