aerique on Nostr: In computer science exists there something like "reversible functions"? (I lack the ...
In computer science exists there something like "reversible functions"? (I lack the vocabulary.)
What I mean is a function where if I put in A I get B and if I put in B I get A so that one has just one piece of code instead of two translators (for the A=>B case and for the B=>A case).
I can image for mathematical functions this would be 'easy' but I'm trying to apply it to translating to and from JSON 😅
#Lisp #CommonLisp
Published at
2024-10-24 19:19:01 UTCEvent JSON
{
"id": "c76f87f4a91af4236db514af4db208a84c629d3e15a4305e84d701a130da1d75",
"pubkey": "03afb9ee0ad450fcc525902d44d3a5a36020c3339409903b4ad4cc42f5485665",
"created_at": 1729797541,
"kind": 1,
"tags": [
[
"t",
"commonlisp"
],
[
"proxy",
"https://genart.social/@aerique/113364011683470005",
"web"
],
[
"t",
"lisp"
],
[
"proxy",
"https://genart.social/users/aerique/statuses/113364011683470005",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://genart.social/users/aerique/statuses/113364011683470005",
"pink.momostr"
],
[
"-"
]
],
"content": "In computer science exists there something like \"reversible functions\"? (I lack the vocabulary.)\n\nWhat I mean is a function where if I put in A I get B and if I put in B I get A so that one has just one piece of code instead of two translators (for the A=\u003eB case and for the B=\u003eA case).\n\nI can image for mathematical functions this would be 'easy' but I'm trying to apply it to translating to and from JSON 😅 \n\n#Lisp #CommonLisp",
"sig": "77cd1cf4097b14c16c76bd02cf06e8dfe4ce02fefb55fc9d1bebe3ac7afdfaa8efe950c6dcd9e4a1afa9ce881944a5d781951dd835e4249df68d90984ce18b04"
}