不应该像Haskell这样的惰性语言允许这个定义,其中函数是curry?
apply f [] = f apply f (x:xs) = apply (f x) xs
它基本上是一个将给定函数应用于给定参数列表的函数,并且很容易在Lisp中完成.有没有解决方法?
haskell types type-inference currying variadic-functions
currying ×1
haskell ×1
type-inference ×1
types ×1
variadic-functions ×1