YoshikuniJujo on Nostr: Haskellのリストの定義、相互再帰で data [] a = [] | NonEmpty a data ...
Haskellのリストの定義、相互再帰で
data [] a = [] | NonEmpty a
data NonEmpty a = a : [] a
みたいになってれば「きれい」なのに、と。
Published at
2024-09-24 01:35:17Event JSON
{
"id": "fee4ce7b64a5df51051653232a3a41f188833ee1415a94a30ff9235efb126be6",
"pubkey": "ef89ee45550f7377284d31e49fc57e5732ffc2b95a7bf35d0f1291d6fa278758",
"created_at": 1727141717,
"kind": 1,
"tags": [],
"content": "Haskellのリストの定義、相互再帰で\n\ndata [] a = [] | NonEmpty a\n\ndata NonEmpty a = a : [] a\n\nみたいになってれば「きれい」なのに、と。",
"sig": "097a74be760d09b3691c89b2fc86e77ae1d3564ea74b74441a9f950150f1503e6ea986c515c7a5a608c8dcc5469e68e1b32fed5bf009811b81f3e8b8096d3d24"
}