Fork me on GitHub
#specter
<
2019-01-22
>
phil13:01:25

Hey, all. In discovery phase and stuck on one already: given [["1" "2"] ["3" "4"] [nil "6"]], how would I get back 6? In other words find seq where the first value is nil and return the second value?

schmee13:01:34

@phil here is one way to do it:

user=> a
[["1" "2"] ["3" "4"] [nil "6"]]

user=> (select-one [ALL (selected? FIRST (pred= nil)) 1] a)
"6"

phil13:01:53

@schmee Thanks.