Curator of Mastodon.art fediblock :newt: on Nostr: nprofile1q…f359z C++, Haskell, a few others. It's all just values of different ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqufmlneg8tt9jwvk6p40t02lxhmkns6zlpu4cwrvxerczdnn4syzqrf359z (nprofile…359z) C++, Haskell, a few others. It's all just values of different types. Semantically, there is no difference other than being able to apply a function to some other values (which also could be functions).
Consider the classic map function implementation:
map :: (a -> b) -> List a -> List b
map f (x : xs) = f x : map f xs
map f [] = []
You'll have to endure the Haskell syntax for a bit, but hopefully the meaning of this is pretty apparent. Now, tell me. Is f a function here? Or a variable? Or both?
Published at
2025-02-10 14:49:33Event JSON
{
"id": "44f2b3109fa7750b84c58b73b9c0ae54ce024f6804e5c28f4d416640de0e8940",
"pubkey": "7615614e4ed5bed70847ce5a32852a79ddde9dce8a650059f31546d61c1ad441",
"created_at": 1739198973,
"kind": 1,
"tags": [
[
"p",
"e277f9e5075acb2732da0d5eb7abe6beed38685f0f2b870d86c8f026ce758104",
"wss://relay.mostr.pub"
],
[
"p",
"d183780b26c261c46404d339c2524481e2abb631caac0058694a12cf6aec60e4",
"wss://relay.mostr.pub"
],
[
"e",
"dc98ae7f607a8501d554424208fce6e0b412b51ede93bfc20d2e2f4bc9978d7d",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://stereophonic.space/objects/8e087584-9247-4ee9-bea8-90113edf403d",
"activitypub"
]
],
"content": "nostr:nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqufmlneg8tt9jwvk6p40t02lxhmkns6zlpu4cwrvxerczdnn4syzqrf359z C++, Haskell, a few others. It's all just values of different types. Semantically, there is no difference other than being able to apply a function to some other values (which also could be functions).\n\nConsider the classic map function implementation:\n\nmap :: (a -\u003e b) -\u003e List a -\u003e List b\nmap f (x : xs) = f x : map f xs\nmap f [] = []\n\n\nYou'll have to endure the Haskell syntax for a bit, but hopefully the meaning of this is pretty apparent. Now, tell me. Is f a function here? Or a variable? Or both?",
"sig": "26889f7d44a091dc3d6d7e2b45597f2cf23f952afbebc2e7adcb3ce551050af8fd96affa7f62ff37ad31b527ba24fb2c476e08aa85f7cd69ce6a2d14307bf173"
}