Can you create functions that return functions of a dependent arity in a dependently typed language?
问题 From what I know about dependent types, I think that it should possible, but I've never seen an example of this before in a dependently typed language, so I'm not exactly sure where to start. What I want is a function of the form: f : [Int] -> (Int -> Bool) f : [Int] -> (Int -> Int -> Bool) f : [Int] -> (Int -> Int -> Int -> Bool) etc... This function takes a list of n Ints , and returns a predicate function of arity n that takes Ints as an argument. Is this sort of thing possible in a