我对Haskell很陌生,我对AList (a -> a)感到困惑,特别是如何将自己的AppendedList转换为常规列表。任何帮助都将不胜感激。newtype AppendedList a = AList ([a] -> [a])
-- Thisfunction takes an argument and returns the AppendedList for that
single :: a -> Append
如果我将函数作为alist传入,而不是作为list传入,就可以做到这一点。df <- data.frame(x=1:3) # Insert a check along the lines of is.alist(a)paste('Applying', a[[i]], 'to the dataframe df')) return(result)
a <- alis