Zulip Chat Archive
Stream: Is there code for X?
Topic: canonical way to build `Fin 3 -> a`?
Siddharth Bhat (Dec 15 2023 at 10:40):
Given three values x, y, z : a
, what's the canonical way to build a function f : Fin 3 -> a
such that f 0 = x
, f 1 = y
, and f 2 = z
? Bonus points if the answer generalizes to all n
:)
Mario Carneiro (Dec 15 2023 at 10:41):
![x, y, z]
Siddharth Bhat (Dec 15 2023 at 10:41):
Thanks! For future reference, how could I have found that out for myself?
Mario Carneiro (Dec 15 2023 at 10:41):
which desugars to uses of Fin.cons
Mario Carneiro (Dec 15 2023 at 10:42):
Siddharth Bhat said:
Thanks! For future reference, how could I have found that out for myself?
Ask about it on #Is there code for X?
Last updated: Dec 20 2023 at 11:08 UTC