Damus
Kartik Agaram · 7w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq4rvx632dlvqthkn3a7uacmcklf7peee89dg6hjkn9ntdlwxzg97qgwcdda Doesn't quite capture the conditional nature. Maybe when-given?
Panicz Maciej Godek profile picture
@nprofile1q...

I think that

(given (((isnt x null?))) something-something)

naturally corresponds to "given that x isn't null" in English, and

(given ((x 5)) blah)

could be read as "given x to be 5", and that those two usages from English correspond nicely to the two fundamental cases of and-let*.

Also, clearly

(given ((something (get-something)))
(do something))

shouldn't do anything when something is nothing (i.e. when it wasn't given) 🤪
1
Shane Celis · 7w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq4rvx632dlvqthkn3a7uacmcklf7peee89dg6hjkn9ntdlwxzg97qgwcdda nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqs5arew84aktld949hmunlrnvt0cs7d5zvrkvv9wg0mfnnmh46lnqsmfr3t I like it but I'd want it as an alias because the and-let tells me more ...