as simple as possible

1 view
Skip to first unread message

Raoul Duke

unread,
Dec 10, 2025, 1:58:08 PM (13 days ago) Dec 10
to pi...@googlegroups.com
funny how in lots of languages it is hard to have standard consistent clean ways to conditionally get & do something if a dict does/not have a certain entry. 


Mike Austin

unread,
Dec 17, 2025, 8:03:56 PM (5 days ago) Dec 17
to PiLuD
I like "update" functions with default values. Something like:

"abcaba" | reduce (counts = {:}, letter) => {
  counts | update letter (count = 0) => count + 1
}
Reply all
Reply to author
Forward
0 new messages