Fay JQuery work with array of elements
问题 What is the preferred way, how to compute the number of elements selected by a selector? One way I can think of, is to call JQuery's size : size :: JQuery -> Fay Int size = ffi "%1['size']()" The other way is to get a list from a function call and then count the elements. The type of the function, that retrieves the elements would probably be: elems :: JQuery -> Fay [Elem] Anyone know, how to implement it? How does one describe the mapping between javascript types and haskell types? 回答1: