|
|
|
|
|
by tome
2145 days ago
|
|
Sure it's possible in Haskell. I'm not sure where in that paper you got the impression it isn't. Of course one can't define variadic functions in Haskell, but that's a more fundamental difference from Clojure, not a "code pattern that [is] safe and easy to do with dynamic typing, but impossible with simple type systems or more complex with more advanced type system." > traverse_ print (sequenceA [ZipList [1,2], ZipList [3,4]])
[1,3]
[2,4]
|
|
Basically, instead of your example I would like to do something like this:
Can this be done? What is the type of cl_map?Note: If this doesn't work with ZipList, that's ok - the important part is being able to supply the function at runtime. Also, please don't assume that the function is associative or anything like that - it's an arbitrary function of N parameters.