(λ. borkdude) on Nostr: The reason I don't use keywords with questions marks for boolean becomes apparent in ...
The reason I don't use keywords with questions marks for boolean becomes apparent in this example:
(e/parse-string "..." {:regex true :location? (constantly false)})
:regex is a boolean (true or false), but :location? is a predicate that returns true or false.
#clojure
Published at
2024-02-05 11:50:57Event JSON
{
"id": "0a091ddcdb6abfe6b2c70d1e1b093ca300c9ff36a87e12f0728a041483d2ced1",
"pubkey": "c4ef83416f079257f5390f7d55a65e684d1b498d196e0e71bb8b90e21a820e07",
"created_at": 1707133857,
"kind": 1,
"tags": [
[
"t",
"clojure"
],
[
"proxy",
"https://mastodon.social/users/borkdude/statuses/111878724489144831",
"activitypub"
]
],
"content": "The reason I don't use keywords with questions marks for boolean becomes apparent in this example:\n\n(e/parse-string \"...\" {:regex true :location? (constantly false)})\n\n:regex is a boolean (true or false), but :location? is a predicate that returns true or false.\n\n#clojure",
"sig": "d4865599064a61b87a3b42c46151dc65899f544e2b33033bf18b5982a554faa75cf8003e1b656df965f146ada4751fbc7ed8b2a5cd1c92b4fba7569b2bdbf1f5"
}