yosh on Nostr: Also if you’ve seen `if` statements in match arms (“match guards”), it turns ...
Also if you’ve seen `if` statements in match arms (“match guards”), it turns out that those are part of the `match` and not the general pattern notation.
Because the `if`-statements are placed before the `=>` I assumed they were part of the pattern. But it turns out they aren’t, they’re part of the `match`!
Published at
2024-12-29 21:02:15Event JSON
{
"id": "6dd5d7b8fd2b491a27bfcbf5a00668fad8f6055e3539b354aed0040fba4ac3e3",
"pubkey": "e1f48d2f077b0d512e8666bf7a0dddded2e443d99b0c92cecf577b4e50b86563",
"created_at": 1735506135,
"kind": 1,
"tags": [
[
"e",
"1d442052403cec14a3d41526152d10ff86f7b9de6389486fff7794b5dd5680c7",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://toot.yosh.is/users/yosh/statuses/113738130086228245",
"activitypub"
]
],
"content": "Also if you’ve seen `if` statements in match arms (“match guards”), it turns out that those are part of the `match` and not the general pattern notation.\n\nBecause the `if`-statements are placed before the `=\u003e` I assumed they were part of the pattern. But it turns out they aren’t, they’re part of the `match`!",
"sig": "271e5e0e21451300f98834e3d5dc9a656b6fa84d4bc00df5b7ea1e06a3e16e285de8f611afb4651a43785289c7014f46ff60ba3c5d9c4671743c244e7724428f"
}