Advertisement
Guest User

Flatten array issue

a guest
Feb 18th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.46 KB | None | 0 0
  1.     let GetCategories (entries : Entry array) =
  2.         let categories : seq<string []> = query {
  3.             for entry in entries do
  4.             where (entry.Categories.Length > 0)
  5.             select entry.Categories
  6.         }
  7.         let arr : string [][] = Seq.toArray categories
  8.         let flatArr = Array.collect arr
  9. //- flatArr error ---------------
  10. Error   1   This expression was expected to have type
  11.     'a -> 'b []    
  12. but here has type
  13.     string [] []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement