Open Seasawher opened 4 months ago
マクロを書けばできそう
import Mathlib
set_option linter.unusedVariables false
def foo (a1 a2 a3 a4 a5 a6 a7 : String) : IO Unit :=
IO.println "many arguments!"
def args := ["one", "two", "three", "four", "five", "six", "seven"]
def apply (l : List α) (f : Function.OfArity α β l.length) : β :=
match l with
| [] => f
| x :: xs => apply xs (f x)
#eval (apply args foo : IO Unit)