coalesce 함수
coalesce 함수
coalesce는 임의 개수의 인자를 받아 그중 null이거나 빈 문자열이 아닌 첫 번째 값을 반환해요.
출처: Packer 공식 문서
본문
예시 (Examples)
> coalesce("a", "b")
a
> coalesce("", "b")
b
> coalesce(1,2)
1
문자열 목록으로 coalesce 연산을 수행하려면 ... 기호를 사용해 목록을 인자로 펼치면 돼요.
> coalesce(["", "b"]...)
b
관련 함수 (Related Functions)
coalescelist는 개별 인자 대신 목록 인자로 유사한 연산을 수행해요.